From d863e15b5049a05b617276fdf86e2df42a0d7501 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Wed, 12 Jan 2022 17:21:45 +0100 Subject: Add TQT_CMAKE_DIR variable. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- modules/FindTQt.cmake | 7 +++++++ modules/TDEMacros.cmake | 6 ++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/modules/FindTQt.cmake b/modules/FindTQt.cmake index 9c36cb9..1b7df8e 100644 --- a/modules/FindTQt.cmake +++ b/modules/FindTQt.cmake @@ -99,6 +99,13 @@ if( NOT TQT_FOUND ) tde_restore( CMAKE_REQUIRED_INCLUDES CMAKE_REQUIRED_LIBRARIES ) + # TQT_CMAKE_DIR + if( NOT DEFINED TQT_CMAKE_DIR ) + set( TQT_CMAKE_DIR "${TQT_LIBDIR}/cmake" + CACHE FILEPATH "Path for shared TQt CMake targets" ) + endif() + + # TQT_CXX_FLAGS foreach( _flag ${TQT_CFLAGS} ${TQT_CFLAGS_OTHER} ) set( TQT_CXX_FLAGS "${TQT_CXX_FLAGS} ${_flag}" ) diff --git a/modules/TDEMacros.cmake b/modules/TDEMacros.cmake index 661587f..b438deb 100644 --- a/modules/TDEMacros.cmake +++ b/modules/TDEMacros.cmake @@ -773,10 +773,12 @@ macro( tde_import _library ) else() if( EXISTS "${TDE_CMAKE_DIR}/${_library}.cmake" ) include( "${TDE_CMAKE_DIR}/${_library}.cmake" ) - message( STATUS " ok, found import file" ) + elseif( EXISTS "${TQT_CMAKE_DIR}/${_library}.cmake" ) + include( "${TQT_CMAKE_DIR}/${_library}.cmake" ) else() - tde_message_fatal( "'${_library}' are required,\n but is not installed nor selected for build" ) + tde_message_fatal( "'${_library}' is required, but is not installed nor selected for build" ) endif() + message( STATUS " ok, found import file" ) endif() endmacro() -- cgit v1.2.1