summaryrefslogtreecommitdiffhomepage
path: root/cmake/opentrack-platform.cmake
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-05-30 07:20:17 +0200
committerStanislaw Halik <sthalik@misaki.pl>2018-05-30 07:20:17 +0200
commit9f1595131f15e47d12c6a633e45d8ef837bddd75 (patch)
treed02dc02685b67ad24d13e05bea8fbe5c46c20f51 /cmake/opentrack-platform.cmake
parent73032cf0e8df0b942b3617cd06f1d50078ee085a (diff)
cmake: binutils fixes
Diffstat (limited to 'cmake/opentrack-platform.cmake')
-rw-r--r--cmake/opentrack-platform.cmake7
1 files changed, 7 insertions, 0 deletions
diff --git a/cmake/opentrack-platform.cmake b/cmake/opentrack-platform.cmake
index 1141eac8..332fd51f 100644
--- a/cmake/opentrack-platform.cmake
+++ b/cmake/opentrack-platform.cmake
@@ -155,6 +155,13 @@ if(MINGW)
add_definitions(-DMINGW_HAS_SECURE_API)
endif()
+# assume binutils
+if(LINUX)
+ foreach (i SHARED MODULE EXE)
+ set(CMAKE_${i}_LINKER_FLAGS "${CMAKE_${i}_LINKER_FLAGS} -Wl,-z,relro,-z,now,--exclude-libs,ALL")
+ endforeach()
+endif()
+
if(UNIX AND NOT APPLE)
include(opentrack-pkg-config)
endif()