From a2dc18bee26fdf1b7fe3cd0b79d00b1428cac48b Mon Sep 17 00:00:00 2001 From: Daniel Svensson Date: Mon, 21 Oct 2024 21:34:55 +0200 Subject: [PATCH] BUILD: Skip base entitlement for release builds on macOS. For debug builds this injects the com.apple.security.get-task-allow entitlement which allows the debugger to connect. Disabling this for release builds is recommended. --- CMakeLists.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1f668cb44..dad577512 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -912,10 +912,12 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") if(ENABLE_SANDBOX) set_target_properties(ezquake PROPERTIES - XCODE_ATTRIBUTE_ENABLE_APP_SANDBOX YES - XCODE_ATTRIBUTE_ENABLE_HARDENED_RUNTIME YES - XCODE_ATTRIBUTE_CODE_SIGN_INJECT_BASE_ENTITLEMENTS YES - XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS "dist/macOS/ezquake.entitlements.plist" + XCODE_ATTRIBUTE_ENABLE_APP_SANDBOX YES + XCODE_ATTRIBUTE_ENABLE_HARDENED_RUNTIME YES + XCODE_ATTRIBUTE_CODE_SIGN_INJECT_BASE_ENTITLEMENTS[variant=Debug] YES + XCODE_ATTRIBUTE_CODE_SIGN_INJECT_BASE_ENTITLEMENTS[variant=RelWithDebInfo] YES + XCODE_ATTRIBUTE_CODE_SIGN_INJECT_BASE_ENTITLEMENTS[variant=Release] NO + XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS "dist/macOS/ezquake.entitlements.plist" ) endif() endif()