From 165ed6f945613e180fdbecc99328bd7ecbdc08ae Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Wed, 26 Dec 2018 17:32:58 +0100 Subject: cmake: fix mingw-w64 build --- cmake/opentrack-platform.cmake | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'cmake') 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) -- cgit v1.2.3