mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-27 04:41:23 +00:00
Attempt to play nice to cmake.
This commit is contained in:
parent
ff21b571b4
commit
420a27ce11
3 changed files with 4 additions and 2 deletions
|
@ -103,7 +103,8 @@ set(GIT_EXECUTABLE "git" CACHE FILEPATH "Path to git binary")
|
||||||
include(GitUtilities)
|
include(GitUtilities)
|
||||||
git_describe(SRB2_GIT_DESCRIBE "${CMAKE_SOURCE_DIR}")
|
git_describe(SRB2_GIT_DESCRIBE "${CMAKE_SOURCE_DIR}")
|
||||||
git_current_branch(SRB2_GIT_BRANCH "${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)
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/src/config.h)
|
||||||
|
|
||||||
##### PACKAGE CONFIGURATION #####
|
##### PACKAGE CONFIGURATION #####
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
#if (defined(CMAKECONFIG))
|
#if (defined(CMAKECONFIG))
|
||||||
#include "config.h"
|
#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;
|
const char *comprevision = SRB2_COMP_REVISION;
|
||||||
|
|
||||||
#elif (defined(COMPVERSION))
|
#elif (defined(COMPVERSION))
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
#define ASSET_HASH_PATCH_DTA "${SRB2_ASSET_patch.dta_HASH}"
|
#define ASSET_HASH_PATCH_DTA "${SRB2_ASSET_patch.dta_HASH}"
|
||||||
|
|
||||||
#define SRB2_COMP_REVISION "${SRB2_COMP_REVISION}"
|
#define SRB2_COMP_REVISION "${SRB2_COMP_REVISION}"
|
||||||
|
#define SRB2_COMP_BRANCH "${SRB2_COMP_BRANCH}"
|
||||||
#define SRB2_GIT_DESCRIBE "${SRB2_GIT_DESCRIBE}"
|
#define SRB2_GIT_DESCRIBE "${SRB2_GIT_DESCRIBE}"
|
||||||
#define SRB2_GIT_BRANCH "${SRB2_GIT_BRANCH}"
|
#define SRB2_GIT_BRANCH "${SRB2_GIT_BRANCH}"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue