Skip to content

Commit 9ad1a69

Browse files
committed
Merge branch 'master' of github.com:ngscopeclient/scopehal-apps
2 parents c533885 + 954776c commit 9ad1a69

File tree

4 files changed

+18
-1
lines changed

4 files changed

+18
-1
lines changed

src/ngscopeclient/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,9 +253,13 @@ if(APPLE)
253253
set(APPS "\${CMAKE_INSTALL_PREFIX}/bin/ngscopeclient")
254254
set(DIRS "\${CMAKE_INSTALL_PREFIX}/lib")
255255
set(FRAMEWORKS "\${CMAKE_INSTALL_PREFIX}/Frameworks")
256+
# https://vulkan.lunarg.com/doc/view/1.3.275.0/mac/getting_started.html#application-bundle-structure-on-macos
257+
install(FILES "${CMAKE_SOURCE_DIR}/src/ngscopeclient/macos/MoltenVK_icd.json"
258+
DESTINATION bin/vulkan/icd.d/)
259+
install(FILES "/opt/homebrew/opt/molten-vk/lib/libMoltenVK.dylib" DESTINATION lib)
256260
install(CODE "
257261
include(BundleUtilities)
258-
fixup_bundle(\"${APPS}\" \"\" \"${DIRS}\")
262+
fixup_bundle(\"${APPS}\" \"lib/libMoltenVK.dylib\" \"${DIRS}\")
259263
include(\"${CMAKE_SOURCE_DIR}/src/ngscopeclient/macos/signing.cmake\")
260264
")
261265
endif()
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"file_format_version": "1.0.0",
3+
"ICD": {
4+
"library_path": "../../lib/libMoltenVK.dylib",
5+
"api_version": "1.3.0",
6+
"is_portability_driver": true
7+
}
8+
}

src/ngscopeclient/macos/ngscopeclient.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ BUNDLE="`echo "$0" | sed -e 's/\/Contents\/MacOS\/ngscopeclient//'`"
44
RESOURCES="$BUNDLE/Contents/Resources"
55

66
export "PATH=$RESOURCES/bin:$PATH"
7+
#HACK: no clue why install_name_tool isn't fixing this...
8+
export DYLD_LIBRARY_PATH="$RESOURCES/lib:$RESOURCES/Frameworks:${DYLD_LIBRARY_PATH}"
79

810
exec "$RESOURCES/bin/ngscopeclient" $*
911

src/ngscopeclient/macos/signing.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ endif()
44

55
get_filename_component(APP_BUNDLE "${CMAKE_INSTALL_PREFIX}/../.." ABSOLUTE)
66

7+
message(STATUS "Running chmod 755 for all dylibs")
8+
execute_process(COMMAND find "${APP_BUNDLE}" -type f -name "*.dylib" -exec chmod 755 {} \;)
9+
710
message(STATUS "Signing all dylibs")
811
execute_process(COMMAND find "${APP_BUNDLE}" -type f -name "*.dylib" -exec codesign --force -s "${SIGNING_IDENTITY}" {} \;)
912

0 commit comments

Comments
 (0)