diff --git a/CMakeLists.txt b/CMakeLists.txt index d27c382..c75fa7f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -43,6 +43,9 @@ EXECUTE_PROCESS( MESSAGE(STATUS "GIT_COMMIT_HASH: ${GIT_COMMIT_HASH}") MESSAGE(STATUS "GIT_COMMIT_DATE: ${BUILD_DATE}") +ADD_DEFINITIONS(-DKIWI_GIT_COMMIT_ID="${GIT_COMMIT_HASH}") +ADD_DEFINITIONS(-DKIWI_BUILD_DATE="${BUILD_DATE}") + IF(CMAKE_BUILD_TYPE STREQUAL "Release") MESSAGE("Building in Release mode") ELSE() @@ -273,10 +276,3 @@ ADD_CUSTOM_TARGET(cpplint echo '${LINT_FILES}' | xargs -n12 -P8 --linelength=120 --filter=-legal/copyright,-build/header_guard,-runtime/references ) - -TARGET_COMPILE_DEFINITIONS(kiwi PRIVATE - KIWI_VERSION="${K_VERSION}" - KIWI_BUILD_TYPE="${BUILD_TYPE}" - KIWI_GIT_COMMIT_ID="${GIT_COMMIT_ID}" - KIWI_BUILD_DATE="${BUILD_TIME}" -) \ No newline at end of file diff --git a/src/kiwi.h b/src/kiwi.h index be0e75a..038f5b6 100644 --- a/src/kiwi.h +++ b/src/kiwi.h @@ -15,7 +15,7 @@ #include "net/event_server.h" #include "options.h" -// #define KIWI_VERSION "4.0.0" +#define KIWI_VERSION "4.0.0" #ifdef BUILD_DEBUG # define KIWI_BUILD_TYPE "DEBUG"