summaryrefslogtreecommitdiffhomepage
path: root/cmake
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-12-26 17:32:58 +0100
committerStanislaw Halik <sthalik@misaki.pl>2018-12-26 17:45:02 +0100
commit165ed6f945613e180fdbecc99328bd7ecbdc08ae (patch)
treec0197ec168bd98a16c99e78c9f06e82f66b86889 /cmake
parent5cb620108a6843d44e0a65daac93f2d55ab1eb64 (diff)
cmake: fix mingw-w64 build
Diffstat (limited to 'cmake')
-rw-r--r--cmake/opentrack-platform.cmake9
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)