Browse Source

Fix detection for option TDEINIT_USE_XFT with CMake build

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit 14243cc8ea)
Slávek Banko 3 years ago
parent
commit
1af68b9ef8
2 changed files with 9 additions and 2 deletions
  1. 8
    1
      CMakeLists.txt
  2. 1
    1
      tdeinit/CMakeLists.txt

+ 8
- 1
CMakeLists.txt View File

@@ -824,10 +824,17 @@ endif( WITH_ARTS )
824 824
 
825 825
 ##### check for Xft #############################
826 826
 
827
+string( REGEX REPLACE ".*;([^;]*qt-mt);.*" "\\1" TQT_MT ";${TQT_LIBRARIES};" )
828
+if( TQT_MT )
829
+  pkg_search_module( TQT_MT ${TQT_MT} )
830
+  tde_save_and_set( CMAKE_REQUIRED_LIBRARIES "${TQT_MT_LIBRARIES}" )
831
+  check_library_exists( tqt-mt XftInit "" TDEINIT_USE_XFT )
832
+  tde_restore( CMAKE_REQUIRED_LIBRARIES )
833
+endif( TQT_MT )
827 834
 if( TDEINIT_USE_XFT )
828 835
   pkg_search_module( XFT xft )
829 836
   if( NOT XFT_FOUND )
830
-      message(FATAL_ERROR "\nXft are required, but not found on your system" )
837
+    tde_message_fatal( "Xft is required, but not found on your system" )
831 838
   endif( NOT XFT_FOUND )
832 839
 endif( TDEINIT_USE_XFT )
833 840
 

+ 1
- 1
tdeinit/CMakeLists.txt View File

@@ -40,7 +40,7 @@ set( ${target}_SRCS
40 40
 
41 41
 tde_add_executable( ${target}
42 42
   SOURCES ${${target}_SRCS}
43
-  LINK ltdlc-static tdeparts-shared
43
+  LINK ltdlc-static tdeparts-shared ${XFT_LIBRARIES}
44 44
   DESTINATION ${BIN_INSTALL_DIR}
45 45
 )
46 46
 

Loading…
Cancel
Save