Skip to content

Commit

Permalink
BUILD: Skip base entitlement for release builds on macOS.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
dsvensson committed Oct 21, 2024
1 parent da19f8e commit a2dc18b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()

0 comments on commit a2dc18b

Please sign in to comment.