From b7c389c9d3efe5cea722eb7395fb70529dd27566 Mon Sep 17 00:00:00 2001 From: Mike Schuchardt Date: Wed, 27 Jun 2018 15:58:49 -0600 Subject: cmake: Clean up macOS install target - Stop hardcoding CMAKE_INSTALL_PREFIX to CMAKE_BINARY_DIR so install products are in a predictable location - Use install/fixup_bundle to create stand-alone app bundles for cube, cubepp, vulkaninfo-bundle at CMAKE_INSTALL_PREFIX - Set INSTALL_RPATH_USE_LINK_PATH for bundle targets so fixup_bundle can find libraries when run from the install tree - Remove rpath from install copy of vulkaninfo - Remove extraneous copy of libMoltenVK.dylib from CMAKE_INSTALL_PREFIX/demos - Update BUILD.md --- cube/macOS/cubepp/cubepp.cmake | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'cube/macOS/cubepp') diff --git a/cube/macOS/cubepp/cubepp.cmake b/cube/macOS/cubepp/cubepp.cmake index 31ff0125..7e27e9c6 100644 --- a/cube/macOS/cubepp/cubepp.cmake +++ b/cube/macOS/cubepp/cubepp.cmake @@ -67,10 +67,6 @@ set_source_files_properties("${CMAKE_BINARY_DIR}/staging-json/MoltenVK_icd.json" MACOSX_PACKAGE_LOCATION "Resources/vulkan/icd.d") -# Direct the MoltenVK library to the right place. -install(FILES "${MOLTENVK_DIR}/MoltenVK/macOS/libMoltenVK.dylib" DESTINATION "demos/cubepp.app/Contents/Frameworks" - COMPONENT Runtime) - # Copy the MoltenVK lib into the bundle. if(${CMAKE_GENERATOR} MATCHES "^Xcode.*") add_custom_command(TARGET cubepp POST_BUILD @@ -83,19 +79,3 @@ else() ${CMAKE_CURRENT_BINARY_DIR}/cubepp.app/Contents/Frameworks/libMoltenVK.dylib DEPENDS vulkan) endif() - -# Fix up the library search path in the executable to find (loader) libraries in the bundle. -install(CODE " - include(BundleUtilities) - fixup_bundle(${CMAKE_INSTALL_PREFIX}/cube/cubepp.app \"\" \"\") - " - COMPONENT Runtime) - -# ~~~ -# Not sure this is needed. When activated, it makes a symlink from -# libvulkan.dylib to libvulkan.1.dylib (which in turn symlinks to libvulkan.1.0.xx.dylib.) -# install(FILES -# "${CMAKE_BINARY_DIR}/loader/libvulkan.dylib" -# DESTINATION "demos/cubepp.app/Contents/MacOS" -# COMPONENT Runtime) -# ~~~ -- cgit v1.2.3