From 1af68b9ef80dfe55f0378745e0c9d0e91f3b07b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Sun, 14 Jun 2015 03:42:08 +0200 Subject: [PATCH] Fix detection for option TDEINIT_USE_XFT with CMake build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko (cherry picked from commit 14243cc8ead795531e47954763cc8b1bec94a092) --- CMakeLists.txt | 9 ++++++++- tdeinit/CMakeLists.txt | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 19a843812..ca577fe63 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -824,10 +824,17 @@ endif( WITH_ARTS ) ##### check for Xft ############################# +string( REGEX REPLACE ".*;([^;]*qt-mt);.*" "\\1" TQT_MT ";${TQT_LIBRARIES};" ) +if( TQT_MT ) + pkg_search_module( TQT_MT ${TQT_MT} ) + tde_save_and_set( CMAKE_REQUIRED_LIBRARIES "${TQT_MT_LIBRARIES}" ) + check_library_exists( tqt-mt XftInit "" TDEINIT_USE_XFT ) + tde_restore( CMAKE_REQUIRED_LIBRARIES ) +endif( TQT_MT ) if( TDEINIT_USE_XFT ) pkg_search_module( XFT xft ) if( NOT XFT_FOUND ) - message(FATAL_ERROR "\nXft are required, but not found on your system" ) + tde_message_fatal( "Xft is required, but not found on your system" ) endif( NOT XFT_FOUND ) endif( TDEINIT_USE_XFT ) diff --git a/tdeinit/CMakeLists.txt b/tdeinit/CMakeLists.txt index f4124e5d3..346bfa20e 100644 --- a/tdeinit/CMakeLists.txt +++ b/tdeinit/CMakeLists.txt @@ -40,7 +40,7 @@ set( ${target}_SRCS tde_add_executable( ${target} SOURCES ${${target}_SRCS} - LINK ltdlc-static tdeparts-shared + LINK ltdlc-static tdeparts-shared ${XFT_LIBRARIES} DESTINATION ${BIN_INSTALL_DIR} )