From 4554d11ef32344972144f6a03095ce82193426c8 Mon Sep 17 00:00:00 2001 From: Dylan Marcus Date: Wed, 24 Jan 2024 19:44:08 -0500 Subject: [PATCH] fixed the info.plist linking and changed the variables to be more explicit --- CMakeLists.txt | 1 - Resources/CMakeLists.txt | 5 ++++- Resources/Info.plist | 12 ++++++++---- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a9ca93b..6b14089 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -129,7 +129,6 @@ if(APPLE) XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS "${CMAKE_CURRENT_SOURCE_DIR}/Resources/entitlements.mac.plist" XCODE_ATTRIBUTE_INFOPLIST_KEY_LSApplicationCategoryType "public.app-category.utilities" ) - target_link_options(${CMAKE_PROJECT_NAME} PRIVATE LINKER:-sectcreate,__TEXT,__info_plist,${CMAKE_CURRENT_SOURCE_DIR}/Resources/Info.plist) elseif(MSVC OR WIN32 OR MINGW) message(STATUS "Adding windows OS flag for httplib") add_compile_definitions(WIN32_LEAN_AND_MEAN) diff --git a/Resources/CMakeLists.txt b/Resources/CMakeLists.txt index 5bd131f..9391fe9 100644 --- a/Resources/CMakeLists.txt +++ b/Resources/CMakeLists.txt @@ -11,5 +11,8 @@ message(STATUS "Font (default) size: ${DEFAULT_FONT_SIZE}") if(APPLE) # MacOS: Add privacy permissions for access to bluetooth - target_link_options(${CMAKE_PROJECT_NAME} PRIVATE LINKER:-sectcreate,__TEXT,__info_plist,${CMAKE_CURRENT_SOURCE_DIR}/Info.plist) + message(STATUS "Attaching Info.plist found at ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist") + set_target_properties(${CMAKE_PROJECT_NAME} PROPERTIES LINK_FLAGS + "-sectcreate __TEXT __info_plist ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist" + ) endif() \ No newline at end of file diff --git a/Resources/Info.plist b/Resources/Info.plist index f18e66e..3b99cca 100644 --- a/Resources/Info.plist +++ b/Resources/Info.plist @@ -3,15 +3,15 @@ CFBundleExecutable - ${EXECUTABLE_NAME} + m1-orientationmanager CFBundleIconFile Icon.icns CFBundleIdentifier com.mach1.spatial.orientationmanager CFBundleName - ${EXECUTABLE_NAME} + m1-orientationmanager CFBundleDisplayName - ${PRODUCT_NAME} + m1-orientationmanager CFBundlePackageType APPL CFBundleSignature @@ -21,7 +21,7 @@ CFBundleVersion 1.0.0 LSMinimumSystemVersion - ${MACOSX_DEPLOYMENT_TARGET} + 10.14 NSHumanReadableCopyright Mach 1, Corp. NSAppTransportSecurity @@ -33,5 +33,9 @@ This app requires Bluetooth to search and connect to Bluetooth enabled devices NSBluetoothPeripheralUsageDescription This app requires Bluetooth to search and connect to Bluetooth enabled devices + NSCameraUsageDescription + m1-orientationmanager needs access to the camera for some IMU fusion implementations to reset the orientation during use. + NSDesktopFolderUsageDescription + m1-orientationmanager wants to look for usb/serial devices connected by file.