From 007d70579c60308130c8f3a98d73330c477eda62 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 16 Feb 2018 12:14:06 +0100 Subject: cmake/i18n: unbreak translations Issue: #748 --- cmake/opentrack-i18n.cmake | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'cmake') 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}) -- cgit v1.2.3