Skip to content

Commit 2c1a314

Browse files
committed
0.31.13
1 parent 3d5687f commit 2c1a314

File tree

3 files changed

+36
-9
lines changed

3 files changed

+36
-9
lines changed

CMakeLists.txt

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,33 @@ include(./lib/atkaudio/cmake/cpack.cmake)
184184
include(CTest)
185185
add_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)
188215
if(NOT DEFINED ENV{CI} AND NOT DEFINED ENV{GITHUB_ACTIONS} AND NOT CMAKE_INSTALL_PREFIX MATCHES "^/usr")
189216
add_custom_command(

buildspec.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,6 @@
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
}

lib/atkaudio/src/scanner/CMakeLists.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)