diff options
author | mrsanchos <orokhovatskiy@gmail.com> | 2018-02-16 21:05:36 +0300 |
---|---|---|
committer | mrsanchos <orokhovatskiy@gmail.com> | 2018-02-16 21:05:36 +0300 |
commit | b52fd95f1cc86e86ecb696eab07c8d6b6a2e9f5d (patch) | |
tree | a8d5a8c98d8ca3b60b0805504049275a3311f59b /cmake/opentrack-i18n.cmake | |
parent | 82c43da829fdac974b3d6adb8742715382ddd051 (diff) | |
parent | 7a973ae2ad396c8413405e40bcb2eaab67c95d15 (diff) |
Merge branch 'unstable' of https://github.com/opentrack/opentrack into unstable
Diffstat (limited to 'cmake/opentrack-i18n.cmake')
-rw-r--r-- | cmake/opentrack-i18n.cmake | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/cmake/opentrack-i18n.cmake b/cmake/opentrack-i18n.cmake index 3d384595..bc468e8a 100644 --- a/cmake/opentrack-i18n.cmake +++ b/cmake/opentrack-i18n.cmake @@ -11,13 +11,13 @@ function(otr_i18n_for_target_directory n) add_custom_command(OUTPUT "${t2}" COMMAND "${CMAKE_COMMAND}" -E make_directory "${CMAKE_CURRENT_SOURCE_DIR}/lang" COMMAND "${CMAKE_COMMAND}" -E make_directory "${CMAKE_CURRENT_BINARY_DIR}/lang" - COMMAND "${lupdate-binary}" . + COMMAND "${lupdate-binary}" -I "${CMAKE_SOURCE_DIR}" -silent -recursive -no-obsolete -locations none - -no-ui-lines + . -ts "${t}" COMMAND "${CMAKE_COMMAND}" -E copy "${t}" "${t2}" WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" @@ -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}) |