Skip to content

Commit 7ac9d00

Browse files
committed
CPack macOS bundle fixes
1 parent 491245d commit 7ac9d00

2 files changed

Lines changed: 4 additions & 15 deletions

File tree

CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,13 +370,14 @@ if(LINUX)
370370
endif()
371371

372372
if(APPLE)
373-
set(CPACK_BUNDLE "ON")
373+
set(CPACK_BUNDLE "ON")
374+
set(CPACK_GENERATOR "Bundle")
374375
set(CPACK_BUNDLE_PLIST "${PROJECT_SOURCE_DIR}/src/ngscopeclient/macos/Info.plist")
375376
# Must be generated with:
376377
# iconutil -c icns ngscopeclient.iconset
377378
set(CPACK_BUNDLE_ICON "${PROJECT_SOURCE_DIR}/src/ngscopeclient/icons/macos/ngscopeclient.icns")
378379
set(CPACK_PACKAGE_ICON "${PROJECT_SOURCE_DIR}/src/ngscopeclient/icons/macos/ngscopeclient.icns")
379-
set(CPACK_BUNDLE_NAME "ngscopeclient")
380+
set(CPACK_BUNDLE_NAME "ngscopeclient")
380381
set(CPACK_BUNDLE_STARTUP_COMMAND "${PROJECT_SOURCE_DIR}/src/ngscopeclient/macos/ngscopeclient.sh")
381382
set_target_properties(ngscopeclient PROPERTIES
382383
INSTALL_RPATH "@executable_path/../lib;/usr/local/lib;/opt/homebrew/lib")

src/ngscopeclient/CMakeLists.txt

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -269,24 +269,12 @@ endif()
269269
if(APPLE)
270270
set(APPS "\${CMAKE_INSTALL_PREFIX}/bin/ngscopeclient")
271271
set(DIRS "\${CMAKE_INSTALL_PREFIX}/lib")
272-
set(FRAMEWORKS "\${CMAKE_INSTALL_PREFIX}/Frameworks")
273-
execute_process(
274-
COMMAND brew --prefix molten-vk
275-
RESULT_VARIABLE MOLTEN_VK_RESULT
276-
OUTPUT_VARIABLE MOLTEN_VK_OUTPUT
277-
ERROR_QUIET
278-
OUTPUT_STRIP_TRAILING_WHITESPACE
279-
)
280-
if(NOT MOLTEN_VK_RESULT EQUAL 0)
281-
message(FATAL_ERROR "failed to find Homebrew prefix for molten-vk")
282-
endif()
283272
# https://vulkan.lunarg.com/doc/view/1.3.275.0/mac/getting_started.html#application-bundle-structure-on-macos
284273
install(FILES "${CMAKE_SOURCE_DIR}/src/ngscopeclient/macos/MoltenVK_icd.json"
285274
DESTINATION bin/vulkan/icd.d/)
286-
install(FILES "${MOLTEN_VK_OUTPUT}/lib/libMoltenVK.dylib" DESTINATION lib)
287275
install(CODE "
288276
include(BundleUtilities)
289-
fixup_bundle(\"${APPS}\" \"lib/libMoltenVK.dylib\" \"${DIRS}\")
277+
fixup_bundle(\"${APPS}\" \"\" \"${DIRS}\")
290278
include(\"${CMAKE_SOURCE_DIR}/src/ngscopeclient/macos/signing.cmake\")
291279
")
292280
endif()

0 commit comments

Comments
 (0)