mirror of
https://github.com/glest/glest-source.git
synced 2025-02-23 03:02:34 +01:00
Test regex fix for CMakeLists.txt
This commit is contained in:
parent
391546536c
commit
47809c5f9c
@ -47,8 +47,9 @@ MESSAGE(STATUS "================================================================
|
||||
|
||||
SET(PKG_NAME "zetaglest")
|
||||
# read version
|
||||
FILE(READ ${PROJECT_SOURCE_DIR}/source/version.txt ZG_VERSION)
|
||||
string(STRIP "${ZG_VERSION}" ZG_VERSION)
|
||||
FILE(READ ${PROJECT_SOURCE_DIR}/source/shared_lib/include/version.h ZG_VERSION_CONTENT)
|
||||
string(REGEX MATCH "#define GAME_VERSION /"(?:[^"\\]|\\.)*"/" _ ${ZG_VERSION})
|
||||
set(ZG_VERSION ${CMAKE_MATCH_1})
|
||||
MESSAGE(STATUS "Detected ZetaGlest Version is [v${ZG_VERSION}] ")
|
||||
add_definitions(-DZG_VERSION=\"${ZG_VERSION}\")
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user