From a1d6d8f7259ade901a87b33edbef8b31bffb5e26 Mon Sep 17 00:00:00 2001 From: Alex Merry Date: Fri, 6 Feb 2015 11:31:19 +0000 Subject: Document when modules were added to ECM. --- modules/ECMCreateQmFromPoFiles.cmake | 2 ++ 1 file changed, 2 insertions(+) (limited to 'modules/ECMCreateQmFromPoFiles.cmake') diff --git a/modules/ECMCreateQmFromPoFiles.cmake b/modules/ECMCreateQmFromPoFiles.cmake index b66e5989..3f134fbb 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 -- cgit v1.2.1 From bc27ee561756cb6e1e51e3589addab8656fd4b03 Mon Sep 17 00:00:00 2001 From: Dmitry Shachnev Date: Fri, 6 Mar 2015 12:13:38 +0100 Subject: Use lconvert path from Qt cmake config when on Qt >= 5.3.1 Qt5LinguistToolsConfig.cmake defines CMake target for lconvert since Qt 5.3.1, so we should use that if it is available. Our own hacks were not working in some configurations (i.e. when there is /usr/bin/lconvert managed by qtchooser, but no qtchooser configuration file). REVIEW: 122626 --- modules/ECMCreateQmFromPoFiles.cmake | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'modules/ECMCreateQmFromPoFiles.cmake') diff --git a/modules/ECMCreateQmFromPoFiles.cmake b/modules/ECMCreateQmFromPoFiles.cmake index 3f134fbb..afd6f786 100644 --- a/modules/ECMCreateQmFromPoFiles.cmake +++ b/modules/ECMCreateQmFromPoFiles.cmake @@ -110,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) -- cgit v1.2.1 From 90db6547801ec0f637799117ac494ca503f39362 Mon Sep 17 00:00:00 2001 From: Lasse Liehu Date: Thu, 9 Apr 2015 15:36:43 +0300 Subject: Do not call lrelease with -compress According to Oswald Buddenhagen "it doesn't buy much, and there are some long-standing issues with it". Qt bug report: https://bugreports.qt.io/browse/QTBUG-44362 REVIEW: 122501 --- modules/ECMCreateQmFromPoFiles.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/ECMCreateQmFromPoFiles.cmake') diff --git a/modules/ECMCreateQmFromPoFiles.cmake b/modules/ECMCreateQmFromPoFiles.cmake index afd6f786..b4194723 100644 --- a/modules/ECMCreateQmFromPoFiles.cmake +++ b/modules/ECMCreateQmFromPoFiles.cmake @@ -145,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( -- cgit v1.2.1