From 91016bd1ff9470df505a12ddcc5606eb82adc84c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Sun, 1 May 2022 11:51:47 +0200 Subject: [PATCH] Fix Configure tests in case TQT_LIBRARY_DIRS contains multiple paths. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- ConfigureChecks.cmake | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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 @@ -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${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 int main(int, char**) { return 0; } "