From 4b0d6a880be769f169afd83bcdb4770a361a10c6 Mon Sep 17 00:00:00 2001 From: veclavtalica Date: Tue, 24 Sep 2024 17:29:40 +0000 Subject: [PATCH] CMakeLists.txt: haiku support, optional sanitizers --- CMakeLists.txt | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 326f1e7..a66ef57 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,6 +30,13 @@ if(EMSCRIPTEN) endif() endif() +if(HAIKU) + if(TWN_SANITIZE) + message(WARNING "TWN_SANITIZE is set, but not supported - it is turned off") + set(TWN_SANITIZE OFF CACHE INTERNAL "") + endif() +endif() + # add -fPIC globally so that it's linked well add_compile_options($<$:-fPIC>) @@ -156,9 +163,7 @@ function(give_options_without_warnings target) -g3 -gdwarf -fno-omit-frame-pointer - -fstack-protector-all - -fsanitize=undefined - -fsanitize=address + $<$:-fstack-protector-all -fsanitize=undefined -fsanitize=address> $<$:-gsource-map>) target_compile_options(${target} PRIVATE @@ -231,6 +236,7 @@ function(link_deps target) $<$>:SDL2::SDL2> physfs-static xms) + target_include_directories(${target} PUBLIC ${SDL2_INCLUDE_DIRS}) endfunction()