summaryrefslogtreecommitdiffhomepage
path: root/cmake/opentrack-install.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-install.cmake
parent46020a8ea488c2fb9ab94d1b927d109da9557f32 (diff)
cmake: oops, output target deleted the file
Diffstat (limited to 'cmake/opentrack-install.cmake')
-rw-r--r--cmake/opentrack-install.cmake18
1 files changed, 9 insertions, 9 deletions
diff --git a/cmake/opentrack-install.cmake b/cmake/opentrack-install.cmake
index c42ecd91..e4f3b2b2 100644
--- a/cmake/opentrack-install.cmake
+++ b/cmake/opentrack-install.cmake
@@ -65,15 +65,15 @@ function(merge_translations)
set(qm-output "${CMAKE_BINARY_DIR}/${i}.qm")
- add_custom_command(OUTPUT "${qm-output}"
- COMMAND "${Qt5_DIR}/../../../bin/lrelease" -nounfinished -silent ${ts} -qm "${qm-output}"
- DEPENDS ${deps} ${ts}
- COMMENT "Running lrelease for ${i}")
-
- add_custom_target(i18n-lang-${i} ALL DEPENDS "${qm-output}")
-
- list(APPEND all-deps "i18n-lang-${i}")
- install(FILES "${qm-output}" DESTINATION "${opentrack-i18n-pfx}" RENAME "${i}.qm" ${opentrack-perms})
+ if("${ts}")
+ add_custom_command(OUTPUT "${qm-output}"
+ COMMAND "${Qt5_DIR}/../../../bin/lrelease" -nounfinished -silent ${ts} -qm "${qm-output}"
+ DEPENDS ${deps} ${ts}
+ COMMENT "Running lrelease for ${i}")
+ add_custom_target(i18n-lang-${i} ALL DEPENDS "${qm-output}")
+ list(APPEND all-deps "i18n-lang-${i}")
+ install(FILES "${qm-output}" DESTINATION "${opentrack-i18n-pfx}" RENAME "${i}.qm" ${opentrack-perms})
+ endif()
endforeach()
add_custom_target(i18n DEPENDS ${all-deps})
endfunction()