diff options
author | l10n daemon script <scripty@kde.org> | 2015-11-08 21:01:33 +0000 |
---|---|---|
committer | l10n daemon script <scripty@kde.org> | 2015-11-08 21:01:33 +0000 |
commit | 7feccae76e01a65b406995b5ba9526fe9ade4299 (patch) | |
tree | 99011137f4dedcf4bf242e167ac7dc70d9136b8e /modules/ECMCreateQmFromPoFiles.cmake | |
parent | a1bb0b0488843165e606771b75a3a67ba8a131a6 (diff) | |
parent | c88bc78e0ca3834c46b89ca9d14b404751da5d4a (diff) | |
download | extra-cmake-modules-5.16.0-rc2.tar.gz extra-cmake-modules-5.16.0-rc2.tar.bz2 |
Merge remote-tracking branch 'origin/master' into local_releasev5.16.0-rc2v5.16.0
Diffstat (limited to 'modules/ECMCreateQmFromPoFiles.cmake')
-rw-r--r-- | modules/ECMCreateQmFromPoFiles.cmake | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/modules/ECMCreateQmFromPoFiles.cmake b/modules/ECMCreateQmFromPoFiles.cmake index b66e5989..b4194723 100644 --- a/modules/ECMCreateQmFromPoFiles.cmake +++ b/modules/ECMCreateQmFromPoFiles.cmake @@ -68,6 +68,8 @@ # # This generates a C++ file which loads "mylib.qm" at startup, assuming it has # been installed by ecm_create_qm_from_po_files(), and compiles it into ``mylib``. +# +# Since pre-1.0.0. #============================================================================= # Copyright 2014 Aurélien Gâteau <agateau@kde.org> @@ -108,13 +110,18 @@ endfunction() function(_ECM_QM_CREATE_TARGET install_destination catalog_name) # Find lconvert - get_target_property(lrelease_location Qt5::lrelease LOCATION) - get_filename_component(lrelease_path ${lrelease_location} PATH) - find_program(lconvert_executable - NAMES lconvert-qt5 lconvert - PATHS ${lrelease_path} - NO_DEFAULT_PATH - ) + if(TARGET Qt5::lconvert) + set(lconvert_executable Qt5::lconvert) + else() + # Qt < 5.3.1 does not define Qt5::lconvert + get_target_property(lrelease_location Qt5::lrelease LOCATION) + get_filename_component(lrelease_path ${lrelease_location} PATH) + find_program(lconvert_executable + NAMES lconvert-qt5 lconvert + PATHS ${lrelease_path} + NO_DEFAULT_PATH + ) + endif() if (catalog_name) set(install_args RENAME ${catalog_name}.qm) @@ -138,7 +145,7 @@ function(_ECM_QM_CREATE_TARGET install_destination catalog_name) COMMAND ${lconvert_executable} ARGS -i ${it} -o ${tsfile} -target-language ${language} COMMAND Qt5::lrelease - ARGS -compress -removeidentical -silent ${tsfile} -qm ${qmfile} + ARGS -removeidentical -silent ${tsfile} -qm ${qmfile} DEPENDS ${it} ) install( |