gds-render/version/CMakeLists.txt

12 lines
513 B
CMake
Raw Normal View History

2019-09-18 20:40:16 +02:00
project(libversion)
add_library(version STATIC "version.c")
execute_process(COMMAND bash ./generate-version-string.sh
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_VARIABLE GIT_VER)
2019-08-26 00:05:45 +02:00
execute_process(COMMAND bash ./generate-git-commit-string.sh
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_VARIABLE GIT_COMMIT)
message("Commit: ${GIT_COMMIT}")
message("Version: ${GIT_VER}")
target_compile_definitions(version PRIVATE PROJECT_GIT_VERSION=${GIT_VER} PROJECT_GIT_COMMIT=${GIT_COMMIT})