summaryrefslogtreecommitdiffhomepage
path: root/cmake/opentrack-boilerplate.cmake
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-03-22 15:36:38 +0100
committerStanislaw Halik <sthalik@misaki.pl>2017-03-22 15:41:13 +0100
commit5890285123e82daf6ab6b8455a3ca4a2455e42f9 (patch)
treed7e0816498fc4e79c39286dd6a5a15682352faa6 /cmake/opentrack-boilerplate.cmake
parent46020a8ea488c2fb9ab94d1b927d109da9557f32 (diff)
cmake: oops, output target deleted the file
Diffstat (limited to 'cmake/opentrack-boilerplate.cmake')
-rw-r--r--cmake/opentrack-boilerplate.cmake13
1 files changed, 5 insertions, 8 deletions
diff --git a/cmake/opentrack-boilerplate.cmake b/cmake/opentrack-boilerplate.cmake
index bda888fe..32829279 100644
--- a/cmake/opentrack-boilerplate.cmake
+++ b/cmake/opentrack-boilerplate.cmake
@@ -204,24 +204,21 @@ function(opentrack_boilerplate n)
set_property(GLOBAL APPEND PROPERTY opentrack-all-modules "${n}")
set(SDK_SKIP_TRANSLATION_UPDATE FALSE CACHE BOOL "Don't touch existing .ts files")
+ set(langs_ "")
+
foreach(i ${langs})
- if(SDK_SKIP_TRANSLATION_UPDATE AND EXISTS "${i}")
- add_custom_command(OUTPUT "${i}"
- COMMAND ${CMAKE_COMMAND} -E touch_nocreate "${CMAKE_CURRENT_SOURCE_DIR}/lang"
- WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
- DEPENDS ${${n}-all}
- COMMENT "Fake lupdate for ${i}")
- else()
+ if((NOT SDK_SKIP_TRANSLATION_UPDATE) OR (NOT EXISTS "${i}"))
add_custom_command(OUTPUT "${i}"
COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_CURRENT_SOURCE_DIR}/lang"
COMMAND "${Qt5_DIR}/../../../bin/lupdate" -silent -recursive -no-obsolete -locations relative . -ts "${i}"
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
DEPENDS ${${n}-all}
COMMENT "Running lupdate for ${i}")
+ list(APPEND langs_ "${i}")
endif()
endforeach()
- add_custom_target(i18n-module-${n} DEPENDS ${langs})
+ add_custom_target(i18n-module-${n} DEPENDS ${langs_})
if(NOT arg_NO-INSTALL)
set_property(GLOBAL APPEND PROPERTY opentrack-all-source-dirs "${CMAKE_CURRENT_SOURCE_DIR}")