diff options
-rw-r--r-- | cmake/opentrack-platform.cmake | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/cmake/opentrack-platform.cmake b/cmake/opentrack-platform.cmake index 1dd9c3cb..d45e0e1a 100644 --- a/cmake/opentrack-platform.cmake +++ b/cmake/opentrack-platform.cmake @@ -95,10 +95,17 @@ endif() if(CMAKE_COMPILER_IS_GNUCXX AND NOT APPLE) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fuse-cxa-atexit") + # assume binutils foreach (i SHARED MODULE EXE) - set(CMAKE_${i}_LINKER_FLAGS "-Wl,-z,relro,-z,now,--exclude-libs,ALL ${CMAKE_${i}_LINKER_FLAGS}") + set(CMAKE_${i}_LINKER_FLAGS "${CMAKE_${i}_LINKER_FLAGS} -Wl,--exclude-libs,ALL") endforeach() + + if(UNIX) + foreach (i SHARED MODULE EXE) + set(CMAKE_${i}_LINKER_FLAGS "${CMAKE_${i}_LINKER_FLAGS} -Wl,-z,relro,-z,now") + endforeach() + endif() endif() if(WIN32) |