summaryrefslogtreecommitdiffhomepage
path: root/cmake/opentrack-install.cmake
diff options
context:
space:
mode:
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()