File tree Expand file tree Collapse file tree 3 files changed +36
-9
lines changed
Expand file tree Collapse file tree 3 files changed +36
-9
lines changed Original file line number Diff line number Diff line change @@ -184,6 +184,33 @@ include(./lib/atkaudio/cmake/cpack.cmake)
184184include (CTest )
185185add_subdirectory (tests )
186186
187+ # macOS: Copy scanner into bundle and re-sign after build
188+ if (APPLE )
189+ # Use proper identity for CI, ad-hoc for local development
190+ if (CODESIGN_IDENTITY)
191+ set (_sign_identity "${CODESIGN_IDENTITY} " )
192+ else ()
193+ set (_sign_identity "-" )
194+ endif ()
195+
196+ add_custom_command (
197+ TARGET ${CMAKE_PROJECT_NAME}
198+ POST_BUILD
199+ COMMAND
200+ ${CMAKE_COMMAND} -E copy_if_different
201+ $<TARGET_FILE :${CMAKE_PROJECT_NAME} _scanner >
202+ "$<TARGET_BUNDLE_DIR :${CMAKE_PROJECT_NAME} >/Contents/MacOS/"
203+ COMMAND
204+ codesign --force --sign "${_sign_identity} " --deep
205+ $<$<NOT :$<CONFIG :Debug >>:--timestamp >
206+ $<$<NOT :$<CONFIG :Debug >>:-o >
207+ $<$<NOT :$<CONFIG :Debug >>:runtime >
208+ "$<TARGET_BUNDLE_DIR :${CMAKE_PROJECT_NAME} >"
209+ VERBATIM
210+ COMMENT "Adding scanner to bundle and re-signing"
211+ )
212+ endif ()
213+
187214# Automatically run install after build (skip in CI or when installing to system directories without permissions)
188215if (NOT DEFINED ENV{CI} AND NOT DEFINED ENV{GITHUB_ACTIONS} AND NOT CMAKE_INSTALL_PREFIX MATCHES "^/usr" )
189216 add_custom_command (
Original file line number Diff line number Diff line change 4747 "uuids" : {
4848 "windowsApp" : " ad885c58-5ca9-44de-8f4f-1c12676626a9"
4949 },
50- "version" : " 0.31.12 " ,
50+ "version" : " 0.31.13 " ,
5151 "website" : " https://www.atkaudio.com"
5252}
Original file line number Diff line number Diff line change @@ -59,16 +59,16 @@ if(APPLE)
5959 set_target_properties (
6060 ${CMAKE_PROJECT_NAME} _scanner
6161 PROPERTIES
62- MACOSX_BUNDLE
63- FALSE
62+ MACOSX_BUNDLE FALSE
6463 )
65- # Ensure scanner builds before main plugin (copy happens in root CMakeLists.txt)
64+ # Ensure scanner builds before main plugin
6665 add_dependencies (${CMAKE_PROJECT_NAME} ${CMAKE_PROJECT_NAME} _scanner )
67- endif ()
68-
69- # Copy scanner next to plugin after build (for development/local testing)
70- # Installation is handled by cpack.cmake for all platforms
71- if (NOT APPLE )
66+
67+ # Note: Scanner copy and bundle re-signing is handled in root CMakeLists.txt
68+ # because add_custom_command(TARGET) requires the target be in the same directory.
69+ else ()
70+ # Copy scanner next to plugin after build (for development/local testing)
71+ # Installation is handled by cpack.cmake for all platforms
7272 add_custom_command (
7373 TARGET ${CMAKE_PROJECT_NAME} _scanner
7474 POST_BUILD
You can’t perform that action at this time.
0 commit comments