Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
stripe2933 committed Feb 22, 2025
1 parent 1733316 commit 20aa297
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -235,11 +235,11 @@ if (APPLE)
find_package(Vulkan COMPONENTS MoltenVK REQUIRED)
set(APP_BUNDLE_CONTENTS_DIR "${CMAKE_CURRENT_BINARY_DIR}/vk-gltf-viewer.app/Contents")
add_custom_command(TARGET vk-gltf-viewer POST_BUILD
COMMAND ${CMAKE_COMMAND} -E make_directory ${APP_BUNDLE_CONTENTS_DIR}/Frameworks
&& ${CMAKE_COMMAND} -E copy ${Vulkan_LIBRARY} ${Vulkan_MoltenVK_LIBRARY} ${APP_BUNDLE_CONTENTS_DIR}/Frameworks
&& install_name_tool -add_rpath "@executable_path/../Frameworks/" "${APP_BUNDLE_CONTENTS_DIR}/MacOS/vk-gltf-viewer"
&& otool -L "${APP_BUNDLE_CONTENTS_DIR}/MacOS/vk-gltf-viewer"
&& install_name_tool -change ${Vulkan_MoltenVK_LIBRARY} "@rpath/libMoltenVK.dylib" "${APP_BUNDLE_CONTENTS_DIR}/MacOS/vk-gltf-viewer")
COMMAND ${CMAKE_COMMAND} -E make_directory "${APP_BUNDLE_CONTENTS_DIR}/lib" "${APP_BUNDLE_CONTENTS_DIR}/vulkan"
&& ${CMAKE_COMMAND} -E copy ${Vulkan_LIBRARY} ${Vulkan_MoltenVK_LIBRARY} "${APP_BUNDLE_CONTENTS_DIR}/lib" # Copy libvulkan.dylib, libMoltenVK.dylib
&& ${CMAKE_COMMAND} -E rename "${APP_BUNDLE_CONTENTS_DIR}/lib/libvulkan.dylib" "${APP_BUNDLE_CONTENTS_DIR}/lib/libvulkan.1.dylib"
&& ${CMAKE_COMMAND} -E copy "$ENV{VULKAN_SDK}/../macOS/share/vulkan/icd.d" "${APP_BUNDLE_CONTENTS_DIR}/vulkan"
&& install_name_tool -add_rpath "@executable_path/../lib/" "${APP_BUNDLE_CONTENTS_DIR}/MacOS/vk-gltf-viewer")
endif()

# --------------------
Expand Down

0 comments on commit 20aa297

Please sign in to comment.