Skip to content

Commit 50c2dc3

Browse files
committed
Fix signing on macOS
1 parent 8dfb3a0 commit 50c2dc3

3 files changed

Lines changed: 15 additions & 2 deletions

File tree

src/ngscopeclient/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ if(APPLE)
255255
install(CODE "
256256
include(BundleUtilities)
257257
fixup_bundle(\"${APPS}\" \"\" \"${DIRS}\")
258-
execute_process(COMMAND \"codesign --deep --force -s - ${CMAKE_INSTALL_PREFIX}\")
258+
include(\"${CMAKE_SOURCE_DIR}/src/ngscopeclient/macos/signing.cmake\")
259259
")
260260
endif()
261261

src/ngscopeclient/macos/ngscopeclient.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ RESOURCES="$BUNDLE/Contents/Resources"
55

66
export "PATH=$RESOURCES/bin:$PATH"
77

8-
exec "$RESOURCES/bin/ngscopeclient"
8+
exec "$RESOURCES/bin/ngscopeclient" $*
99

1010
#eof
1111

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
if(NOT SIGNING_IDENTITY)
2+
set(SIGNING_IDENTITY -)
3+
endif()
4+
5+
get_filename_component(APP_BUNDLE "${CMAKE_INSTALL_PREFIX}/../.." ABSOLUTE)
6+
7+
message(STATUS "Signing all dylibs")
8+
execute_process(COMMAND find "${APP_BUNDLE}" -type f -name "*.dylib" -exec codesign --force -s "${SIGNING_IDENTITY}" {} \;)
9+
10+
# The .app bundle isn't fully constructed at this stage, so can't run this here...
11+
#message(STATUS "Signing ngscopeclient.app")
12+
#execute_process(COMMAND codesign --force -s "${SIGNING_IDENTITY}" "${APP_BUNDLE}")
13+

0 commit comments

Comments
 (0)