Fixed make install crashing when running
fixup_bundle on MacOS
Change-Id: I2aee07c8a5235fcf2fc559d6d9774c48e1792e38
message(STATUS "Using find_package to locate Vulkan")
find_package(Vulkan)
find_package(VulkanHeaders)
+get_filename_component(Vulkan_LIBRARY_DIR ${Vulkan_LIBRARY} DIRECTORY)
message(STATUS "Vulkan FOUND = ${Vulkan_FOUND}")
+message(STATUS "Vulkan Lib Dir = ${Vulkan_LIBRARY_DIR}")
message(STATUS "Vulkan Lib = ${Vulkan_LIBRARY}")
message(STATUS "Vulkan Headers Include = ${VulkanHeaders_INCLUDE_DIR}")
message(STATUS "Vulkan Headers Registry = ${VulkanRegistry_DIR}")
# Fix up the library references to be self-contained within the bundle.
install(CODE "
include(BundleUtilities)
- fixup_bundle(\${CMAKE_INSTALL_PREFIX}/cube/cube.app \"\" \"\")
+ fixup_bundle(\${CMAKE_INSTALL_PREFIX}/cube/cube.app \"\" \"${Vulkan_LIBRARY_DIR}\")
")
else()
install(TARGETS cube RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
# Fix up the library references to be self-contained within the bundle.
install(CODE "
include(BundleUtilities)
- fixup_bundle(\${CMAKE_INSTALL_PREFIX}/cube/cubepp.app \"\" \"\")
+ fixup_bundle(\${CMAKE_INSTALL_PREFIX}/cube/cubepp.app \"\" \"${Vulkan_LIBRARY_DIR}\")
")
else()
install(TARGETS cubepp RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
# script, which can't be fixed up. Instead pass it the explicit name of the executable.
install(CODE "
include(BundleUtilities)
- fixup_bundle(\${CMAKE_INSTALL_PREFIX}/vulkaninfo/vulkaninfo.app/Contents/MacOS/vulkaninfo \"\" \"\")
+ fixup_bundle(\${CMAKE_INSTALL_PREFIX}/vulkaninfo/vulkaninfo.app/Contents/MacOS/vulkaninfo \"\" \"${Vulkan_LIBRARY_DIR}\")
")