summaryrefslogtreecommitdiffhomepage
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-11-06 12:04:32 +0100
committerStanislaw Halik <sthalik@misaki.pl>2023-11-06 12:04:32 +0100
commit6dae70ad16293295e70a5126c009b3a39571b4aa (patch)
tree04f1fb2ff9d03e8027a3ab2bac35cfcb55186dca /CMakeLists.txt
parent8f43d67836b0083d28a1642fbf7382c8a1b493c3 (diff)
cmake: try enabling relro on linux
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1ecf2291..40df9b3a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -109,9 +109,12 @@ endif()
if(WIN32)
add_definitions(-D_CRT_SECURE_NO_WARNINGS -DNOMINMAX -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0)
endif()
+
if(NOT APPLE AND NOT WIN32)
add_compile_options(-fno-plt)
+ add_link_options(-Wl,-z,relro,-z,now)
endif()
+
add_definitions(
-DIMGUI_DISABLE_OBSOLETE_FUNCTIONS
-DIMGUI_DISABLE_OBSOLETE_KEYIO