Compare commits

...

2 Commits

2 changed files with 6 additions and 1 deletions

View File

@ -30,7 +30,8 @@ add_compile_options(-Wall -Wold-style-declaration -Wuninitialized -Wmaybe-uninit
IF(CMAKE_BUILD_TYPE STREQUAL "Debug")
message("${Yellow}Debug mode for translations used!${ColorReset}")
add_definitions(-DGETTEXT_PACKAGE=\"gds-render\" -DLOCALEDATADIR=\"/usr/share\")
add_definitions(-DGETTEXT_PACKAGE=\"gds-render\" -DLOCALEDATADIR=\"${CMAKE_CURRENT_BINARY_DIR}/translations\")
message("${BoldMagenta}${CMAKE_CURRENT_BINARY_DIR}/translations used as data dir${ColorReset}")
else(CMAKE_BUILD_TYPE STREQUAL "Debug")
message("Global locale directory used. Make sure files in /usr/share/locale are available")
add_definitions(-DGETTEXT_PACKAGE=\"gds-render\" -DLOCALEDATADIR=\"/usr/share\")

View File

@ -29,4 +29,8 @@ execute_process(COMMAND bash ./generate-git-commit-string.sh
OUTPUT_VARIABLE GIT_COMMIT)
message("${BoldGreen}Commit: ${GIT_COMMIT}")
message("Version: ${GIT_VER}${ColorReset}")
IF(GIT_VER MATCHES "-dirty")
message("${BoldRed}Build is dirty! Commit your changes before releasing this version!${ColorReset}")
ENDIF(GIT_VER MATCHES "-dirty")
target_compile_definitions(version PRIVATE PROJECT_GIT_VERSION=${GIT_VER} PROJECT_GIT_COMMIT=${GIT_COMMIT})