aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2021-08-27 11:07:58 +0200
committerPierre Ossman <ossman@cendio.se>2021-08-27 11:07:58 +0200
commite7f8370ffc7371fc1fb175896c7952d99be95312 (patch)
treef436c535588ca0d45d5fd377def21c2ee9710d51
parent2809ed25df7fa5412ebe7ace4bb76d89c5645355 (diff)
downloadtigervnc-e7f8370ffc7371fc1fb175896c7952d99be95312.tar.gz
tigervnc-e7f8370ffc7371fc1fb175896c7952d99be95312.zip
Disable dangerous macOS SDK macros
They define macros such as "check()" which causes our code to break as we have methods with that name.
-rw-r--r--CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 62b87a2e..6d765f75 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -106,6 +106,11 @@ if(WIN32)
add_definitions(-D_WIN32_WINNT=0x0601)
endif()
+# Legacy macros (macOS 10.12 and older) conflict with our code
+if(APPLE)
+ add_definitions(-D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES=0)
+endif()
+
if(CMAKE_SIZEOF_VOID_P MATCHES 8)
message(STATUS "64-bit build")
else()