Browse Source

Avoid overriding user linker flags (LDFLAGS) for modules and shared libs

Signed-off-by: Fabio Rossi <rossi.f@inwind.it>
Fabio Rossi 2 months ago
parent
commit
d8177b4058
2 changed files with 3 additions and 3 deletions
  1. 2
    2
      CMakeLists.txt
  2. 1
    1
      libtdescreensaver/CMakeLists.txt

+ 2
- 2
CMakeLists.txt View File

@@ -1250,8 +1250,8 @@ add_definitions(
1250 1250
 )
1251 1251
 
1252 1252
 set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" )
1253
-set( CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined" )
1254
-set( CMAKE_MODULE_LINKER_FLAGS "-Wl,--no-undefined" )
1253
+set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" )
1254
+set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined" )
1255 1255
 
1256 1256
 
1257 1257
 ##### headers ###################################

+ 1
- 1
libtdescreensaver/CMakeLists.txt View File

@@ -17,7 +17,7 @@ include_directories(
17 17
   ${CMAKE_SOURCE_DIR}/tdecore
18 18
 )
19 19
 
20
-list( REMOVE_ITEM CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined" )
20
+string( REPLACE "-Wl,--no-undefined" "" CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}" )
21 21
 
22 22
 link_directories(
23 23
   ${TDECORE_LIBRARY_DIRS}

Loading…
Cancel
Save