MacOSX: added entitlements to access Documents and camera

This commit is contained in:
matlabbe
2025-10-12 13:30:16 -07:00
parent f54b7685f3
commit 739628aef9
3 changed files with 29 additions and 3 deletions
+7 -3
View File
@@ -578,10 +578,14 @@ IF(WITH_POINTMATCHER)
ENDIF(WITH_POINTMATCHER)
IF(libpointmatcher_FOUND OR GTSAM_FOUND)
find_package(Boost COMPONENTS thread filesystem system program_options date_time REQUIRED)
IF(Boost_MINOR_VERSION GREATER 47)
find_package(Boost COMPONENTS thread filesystem program_options date_time REQUIRED)
IF(Boost_MINOR_VERSION GREATER 80)
find_package(Boost COMPONENTS thread filesystem program_options date_time chrono timer serialization REQUIRED)
ELSEIF(Boost_MINOR_VERSION GREATER 47)
find_package(Boost COMPONENTS thread filesystem system program_options date_time chrono timer serialization REQUIRED)
ENDIF(Boost_MINOR_VERSION GREATER 47)
ELSE()
find_package(Boost COMPONENTS thread filesystem system program_options date_time REQUIRED)
ENDIF()
IF(WIN32)
MESSAGE(STATUS "Boost_LIBRARY_DIRS=${Boost_LIBRARY_DIRS}")
link_directories(${Boost_LIBRARY_DIRS})
+8
View File
@@ -77,6 +77,14 @@ IF(BUILD_AS_BUNDLE AND (APPLE OR WIN32))
SET(qtconf_dest_dir Resources)
SET(thirdparty_dest_dir MacOS)
SET(APPS "\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/MacOS/${CMAKE_BUNDLE_NAME}")
# Add the entitlement file to the target's properties
set(MACOS_ENTITLEMENTS_FILE "${CMAKE_CURRENT_SOURCE_DIR}/app.entitlements")
# Set the entitlement file for the target
set_target_properties(rtabmap_app PROPERTIES
MACOSX_BUNDLE_INFO_PLIST "${MACOS_ENTITLEMENTS_FILE}"
)
ENDIF(APPLE)
IF(OpenNI2_FOUND)
+14
View File
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.files.downloads.read-write</key>
<true/>
<key>com.apple.security.files.downloads.read-only</key>
<false/>
<key>com.apple.security.device.camera</key>
<true/>
</dict>
</plist>s