From 592dcbae53f0b952a053a8946a3c92c26433c5d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20H=C3=BCttel?= Date: Fri, 18 Oct 2019 19:39:54 +0200 Subject: [PATCH] Use translations folder in binary dir when debugging --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7bd759c..e632c60 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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\")