diff --git a/CMakeLists.txt b/CMakeLists.txt index 0fb5cb28..b8fe0ab5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -103,7 +103,8 @@ set(GIT_EXECUTABLE "git" CACHE FILEPATH "Path to git binary") include(GitUtilities) git_describe(SRB2_GIT_DESCRIBE "${CMAKE_SOURCE_DIR}") git_current_branch(SRB2_GIT_BRANCH "${CMAKE_SOURCE_DIR}") -set(SRB2_COMP_REVISION "${SRB2_GIT_DESCRIBE}-<${SRB2_GIT_BRANCH}>") +set(SRB2_COMP_BRANCH "${SRB2_GIT_BRANCH}") +set(SRB2_COMP_REVISION "${SRB2_GIT_DESCRIBE}") configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/src/config.h) ##### PACKAGE CONFIGURATION ##### diff --git a/src/comptime.c b/src/comptime.c index 9f1fe2f7..398eda07 100644 --- a/src/comptime.c +++ b/src/comptime.c @@ -9,7 +9,7 @@ #if (defined(CMAKECONFIG)) #include "config.h" -const char *compbranch = ""; // hell if I know what to do with cmake +const char *compbranch = SRB2_COMP_BRANCH; const char *comprevision = SRB2_COMP_REVISION; #elif (defined(COMPVERSION)) diff --git a/src/config.h.in b/src/config.h.in index 2ed7aec3..5cd75fa5 100644 --- a/src/config.h.in +++ b/src/config.h.in @@ -18,6 +18,7 @@ #define ASSET_HASH_PATCH_DTA "${SRB2_ASSET_patch.dta_HASH}" #define SRB2_COMP_REVISION "${SRB2_COMP_REVISION}" +#define SRB2_COMP_BRANCH "${SRB2_COMP_BRANCH}" #define SRB2_GIT_DESCRIBE "${SRB2_GIT_DESCRIBE}" #define SRB2_GIT_BRANCH "${SRB2_GIT_BRANCH}"