summaryrefslogtreecommitdiffstats
path: root/arch/tde-extra/tde-amarok/bp000-fix-configure-tests.diff
blob: 5668cc5629e3c8e002661c95d9aa47bc7aa1ecc2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index f1b7246b..bab3b80d 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -197,7 +197,10 @@ find_package( OpenGL )
 
 tde_save( CMAKE_REQUIRED_INCLUDES CMAKE_REQUIRED_LIBRARIES )
 set( CMAKE_REQUIRED_INCLUDES ${TQT_INCLUDE_DIRS} )
-set( CMAKE_REQUIRED_LIBRARIES -L${TQT_LIBRARY_DIRS} ${TQT_LIBRARIES} )
+foreach( _dirs ${TQT_LIBRARY_DIRS} )
+  list( APPEND CMAKE_REQUIRED_LIBRARIES "-L${_dirs}" )
+endforeach()
+list( APPEND CMAKE_REQUIRED_LIBRARIES ${TQT_LIBRARIES} )
 
 check_cxx_source_compiles("
 #include <cstdlib>
@@ -219,7 +222,10 @@ if( WITH_KONQSIDEBAR )
   set( CMAKE_REQUIRED_DEFINITIONS ${TQT_CFLAGS_OTHER} )
   set( CMAKE_REQUIRED_INCLUDES ${TDE_INCLUDE_DIR};${TQT_INCLUDE_DIRS};${CMAKE_INCLUDE_PATH} )
   set( CMAKE_REQUIRED_FLAGS "-include tqt.h" )
-  set( CMAKE_REQUIRED_LIBRARIES -L${TQT_LIBRARY_DIRS} -L${QT_LIBRARY_DIRS} ${TQT_LIBRARIES} )
+  foreach( _dirs ${TQT_LIBRARY_DIRS} )
+    list( APPEND CMAKE_REQUIRED_LIBRARIES "-L${_dirs}" )
+  endforeach()
+  list( APPEND CMAKE_REQUIRED_LIBRARIES ${TQT_LIBRARIES} )
   check_cxx_source_compiles("
     #include <konqsidebarplugin.h>
     int main(int, char**) { return 0; } "