diff options
author | Dmitry <Dmitrorus@gmail.com> | 2017-08-04 23:57:01 +0700 |
---|---|---|
committer | Dmitry <Dmitrorus@gmail.com> | 2017-08-04 23:57:01 +0700 |
commit | c5394119e79992cdc8a4943e519ae99b2473367a (patch) | |
tree | 2e26ec4780399cadd416c73f924b8a8ea677da44 | |
parent | 7612e2d171e5b433e7fd206c850baeb636920045 (diff) |
fixed qt binaries location for linux
-rw-r--r-- | cmake/opentrack-boilerplate.cmake | 9 | ||||
-rw-r--r-- | cmake/opentrack-install.cmake | 8 |
2 files changed, 15 insertions, 2 deletions
diff --git a/cmake/opentrack-boilerplate.cmake b/cmake/opentrack-boilerplate.cmake index 73b157a2..e93d2bfe 100644 --- a/cmake/opentrack-boilerplate.cmake +++ b/cmake/opentrack-boilerplate.cmake @@ -110,12 +110,19 @@ endfunction() function(otr_i18n_for_target_directory n) set(k "opentrack-${n}") + + if (LINUX) + set(LUPDATE_BIN "${Qt5_DIR}/../../../../bin/lupdate") + else() + set(LUPDATE_BIN "${Qt5_DIR}/../../../bin/lupdate") + endif() + foreach(i ${opentrack_all-translations}) set(t "${CMAKE_CURRENT_SOURCE_DIR}/lang/${i}.ts") if(NOT opentrack_disable-i18n-update) add_custom_command(OUTPUT "${t}" COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_CURRENT_SOURCE_DIR}/lang" - COMMAND "${Qt5_DIR}/../../../bin/lupdate" -silent -recursive -no-obsolete -locations relative . -ts "${t}" + COMMAND ${LUPDATE_BIN} -silent -recursive -no-obsolete -locations relative . -ts "${t}" WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" DEPENDS ${${k}-cc} ${${k}-hh} ${${k}-ui} ${${k}-rc} COMMENT "Running lupdate for ${n}/${i}") diff --git a/cmake/opentrack-install.cmake b/cmake/opentrack-install.cmake index 0530c5d9..876fbfb5 100644 --- a/cmake/opentrack-install.cmake +++ b/cmake/opentrack-install.cmake @@ -65,11 +65,17 @@ function(merge_translations) endif() endforeach() + if (LINUX) + set(LRELEASE_BIN "${Qt5_DIR}/../../../../bin/lrelease") + else() + set(LRELEASE_BIN "${Qt5_DIR}/../../../bin/lrelease") + endif() + if(NOT ".${ts-files_}" STREQUAL ".") set(qm-output "${CMAKE_CURRENT_BINARY_DIR}/${i}.qm") list(APPEND all-qm-files "${qm-output}") add_custom_command(OUTPUT "${qm-output}" - COMMAND "${Qt5_DIR}/../../../bin/lrelease" -nounfinished -silent ${ts-files_} -qm "${qm-output}" + COMMAND ${LRELEASE_BIN} -nounfinished -silent ${ts-files_} -qm "${qm-output}" DEPENDS ${ts-files} COMMENT "Running lrelease for ${i}") set(lang-target "i18n-lang-${i}") |