Skip to content

Commit

Permalink
Merge branch 'main' of github.com:Mach1Studios/m1-orientationmanager
Browse files Browse the repository at this point in the history
* 'main' of github.com:Mach1Studios/m1-orientationmanager:
  fixed the info.plist linking and changed the variables to be more explicit
  • Loading branch information
himwho committed Jan 25, 2024
2 parents 2fb3ba6 + 1b2a886 commit 96b61cb
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 4 additions & 1 deletion Resources/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
12 changes: 8 additions & 4 deletions Resources/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
<plist version="1.0">
<dict>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<string>m1-orientationmanager</string>
<key>CFBundleIconFile</key>
<string>Icon.icns</string>
<key>CFBundleIdentifier</key>
<string>com.mach1.spatial.orientationmanager</string>
<key>CFBundleName</key>
<string>${EXECUTABLE_NAME}</string>
<string>m1-orientationmanager</string>
<key>CFBundleDisplayName</key>
<string>${PRODUCT_NAME}</string>
<string>m1-orientationmanager</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
Expand All @@ -21,7 +21,7 @@
<key>CFBundleVersion</key>
<string>1.0.0</string>
<key>LSMinimumSystemVersion</key>
<string>${MACOSX_DEPLOYMENT_TARGET}</string>
<string>10.14</string>
<key>NSHumanReadableCopyright</key>
<string>Mach 1, Corp.</string>
<key>NSAppTransportSecurity</key>
Expand All @@ -33,5 +33,9 @@
<string>This app requires Bluetooth to search and connect to Bluetooth enabled devices</string>
<key>NSBluetoothPeripheralUsageDescription</key>
<string>This app requires Bluetooth to search and connect to Bluetooth enabled devices</string>
<key>NSCameraUsageDescription</key>
<string>m1-orientationmanager needs access to the camera for some IMU fusion implementations to reset the orientation during use.</string>
<key>NSDesktopFolderUsageDescription</key>
<string>m1-orientationmanager wants to look for usb/serial devices connected by file.</string>
</dict>
</plist>

0 comments on commit 96b61cb

Please sign in to comment.