summaryrefslogtreecommitdiffhomepage
path: root/cmake/opentrack-i18n.cmake
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-02-16 12:14:06 +0100
committerStanislaw Halik <sthalik@misaki.pl>2018-02-16 12:56:47 +0100
commit007d70579c60308130c8f3a98d73330c477eda62 (patch)
treeaf00ffa38fa1d0bb84c962b06c09f17a2683419f /cmake/opentrack-i18n.cmake
parent4fbfe466e7b4f84e66fc0549f76f4255b3c41f53 (diff)
cmake/i18n: unbreak translations
Issue: #748
Diffstat (limited to 'cmake/opentrack-i18n.cmake')
-rw-r--r--cmake/opentrack-i18n.cmake16
1 files changed, 4 insertions, 12 deletions
diff --git a/cmake/opentrack-i18n.cmake b/cmake/opentrack-i18n.cmake
index ba09036e..bc468e8a 100644
--- a/cmake/opentrack-i18n.cmake
+++ b/cmake/opentrack-i18n.cmake
@@ -48,23 +48,15 @@ function(otr_merge_translations)
set(qm-output "${CMAKE_CURRENT_BINARY_DIR}/${i}.qm")
list(APPEND all-qm-files "${qm-output}")
+
add_custom_command(OUTPUT "${qm-output}"
COMMAND "${lrelease-binary}" -nounfinished -silent ${ts-files} -qm "${qm-output}"
DEPENDS ${ts-files}
COMMENT "Running lrelease for ${i}")
- otr_escape_string(esc-qm-output "${qm-output}")
- otr_escape_string(esc-i18n-pfx "${opentrack-i18n-pfx}")
- otr_escape_string(esc-perms "${opentrack-perms-file}")
- # this is because with i18n update disabled,
- # the file may not exist when running `make i18n-lang-foo_FOO'
- install(CODE "
- if(EXISTS \"${esc-qm-output}\")
- file(INSTALL \"${esc-qm-output}\"
- DESTINATION \"${esc-i18n-pfx}\"
- FILE_PERMISSIONS ${esc-perms})
- endif()
- ")
+ install(FILES "${qm-output}"
+ DESTINATION "${CMAKE_INSTALL_PREFIX}/${opentrack-i18n-pfx}"
+ PERMISSIONS ${opentrack-perms-file})
endforeach()
add_custom_target(i18n ALL DEPENDS ${all-qm-files})