From d8177b405849215646b5c2524a1ec1df245301ff Mon Sep 17 00:00:00 2001 From: Fabio Rossi Date: Mon, 17 Dec 2018 17:07:38 +0100 Subject: Avoid overriding user linker flags (LDFLAGS) for modules and shared libs Signed-off-by: Fabio Rossi --- CMakeLists.txt | 4 ++-- libtdescreensaver/CMakeLists.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index aab7b649f..3291a7090 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1250,8 +1250,8 @@ add_definitions( ) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" ) -set( CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined" ) -set( CMAKE_MODULE_LINKER_FLAGS "-Wl,--no-undefined" ) +set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" ) +set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined" ) ##### headers ################################### diff --git a/libtdescreensaver/CMakeLists.txt b/libtdescreensaver/CMakeLists.txt index 9846efdcf..b39777ec2 100644 --- a/libtdescreensaver/CMakeLists.txt +++ b/libtdescreensaver/CMakeLists.txt @@ -17,7 +17,7 @@ include_directories( ${CMAKE_SOURCE_DIR}/tdecore ) -list( REMOVE_ITEM CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined" ) +string( REPLACE "-Wl,--no-undefined" "" CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}" ) link_directories( ${TDECORE_LIBRARY_DIRS} -- cgit v1.2.1