From c8c3b63ee70e719fc06ae85ccd6687b690639a61 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 110daac20..90d4f2bdc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -911,10 +911,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()