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