aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSaturneric <[email protected]>2023-03-31 08:29:09 +0000
committerSaturneric <[email protected]>2023-03-31 08:29:09 +0000
commit2792b7565e084a1b6f209ba0095343b464251367 (patch)
tree8d254fd8b43f3c949cf31551ef557f2b7f600992
parentfix: solve known ui issues (diff)
downloadGpgFrontend-2792b7565e084a1b6f209ba0095343b464251367.tar.gz
GpgFrontend-2792b7565e084a1b6f209ba0095343b464251367.zip
fix: solve macos release build always use sandbox issues
-rw-r--r--src/CMakeLists.txt6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 4ec07d66..3417f0cf 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -419,12 +419,17 @@ if (APPLICATION_BUILD)
# option for sandbox mode, still under test
if(GPGFRONTEND_XOCDE_ENABLE_SANDBOX)
+ message(STATUS "Build Application With App Sandbox")
set(CUSTOM_ATTRIBUTE_ENABLE_APP_SANDBOX "Yes")
add_custom_command(TARGET ${AppName} POST_BUILD
COMMAND /bin/cp -rf ${CMAKE_SOURCE_DIR}/resource/lfs/macOS/GnuPG ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}/${AppName}.app/Contents/
WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
COMMENT "Copying Buddled GnuPG into App Bundle Resource")
+ set_target_properties(${AppName} PROPERTIES
+ XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS "${CMAKE_SOURCE_DIR}/GpgFrontend.entitlements"
+ )
else()
+ message(STATUS "Build Application Without App Sandbox")
set(CUSTOM_ATTRIBUTE_ENABLE_APP_SANDBOX "No")
endif()
@@ -434,7 +439,6 @@ if (APPLICATION_BUILD)
XCODE_ATTRIBUTE_OTHER_CODE_SIGN_FLAGS "--deep --entitlements ${CMAKE_SOURCE_DIR}/resource/plist/entitlement.plist"
XCODE_ATTRIBUTE_ENABLE_APP_SANDBOX "${CUSTOM_ATTRIBUTE_ENABLE_APP_SANDBOX}"
XCODE_ATTRIBUTE_ENABLE_HARDENED_RUNTIME "Yes"
- XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS "${CMAKE_SOURCE_DIR}/GpgFrontend.entitlements"
XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "${GPGFRONTEND_XOCDE_CODE_SIGN_IDENTITY}"
)
else ()