From b8b7630bd5e67aa4a85c020d869531e443b805db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Alvarez?= Date: Wed, 23 Apr 2014 13:07:26 -0300 Subject: Only search for qttools if ECM_CREATE_QM_FROM_PO_FILES is called. This means frameworks will only depend on qttools if you have a po directory when building them. Approved by agateau and alexmerry on IRC. --- modules/ECMCreateQmFromPoFiles.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/ECMCreateQmFromPoFiles.cmake b/modules/ECMCreateQmFromPoFiles.cmake index f331460d..7457fc51 100644 --- a/modules/ECMCreateQmFromPoFiles.cmake +++ b/modules/ECMCreateQmFromPoFiles.cmake @@ -79,10 +79,6 @@ # (To distribute this file outside of extra-cmake-modules, substitute the full # License text for the above reference.) -# This gives us Qt5::lrelease and Qt5::lupdate but unfortunately no Qt5::lconvert -# See https://bugreports.qt-project.org/browse/QTBUG-37937 -find_package(Qt5LinguistTools CONFIG REQUIRED) - # Stolen from FindGettext.cmake function(_ECM_QM_GET_UNIQUE_TARGET_NAME _name _unique_name) set(propertyName "_ECM_QM_UNIQUE_COUNTER_${_name}") @@ -162,6 +158,10 @@ function(ECM_CREATE_QM_LOADER out_var catalog_name) endfunction() function(ECM_CREATE_QM_FROM_PO_FILES) + # This gives us Qt5::lrelease and Qt5::lupdate but unfortunately no Qt5::lconvert + # See https://bugreports.qt-project.org/browse/QTBUG-37937 + find_package(Qt5LinguistTools CONFIG REQUIRED) + foreach (arg ${ARGN}) if (arg STREQUAL "PO_DIR") _ecm_create_qm_from_po_files_legacy(${ARGN}) -- cgit v1.2.1