aboutsummaryrefslogtreecommitdiff
path: root/cube/macOS/cubepp
diff options
context:
space:
mode:
authorCharles Giessen <charles@lunarg.com>2023-11-08 17:47:07 -0700
committerJuan Ramos <114601453+juan-lunarg@users.noreply.github.com>2023-11-16 18:28:56 -0700
commit62c4f8f7c546662aa5d43ca185e7d478d1224fb1 (patch)
tree5046aef3adc2f19d2a1c2d6d539ced61ffeb4fb0 /cube/macOS/cubepp
parent5093613de741e02f0fc0efae6796bf87e0615ee8 (diff)
downloadusermoji-62c4f8f7c546662aa5d43ca185e7d478d1224fb1.tar.xz
cube: Use volk to load functions
Add volk as a repo dependency to replace the dependency on the Vulkan-Loader. This makes it easier to build the repo as the vulkan-loader has a much more complex build than volk does. It also allows vkcube to launch without vulkan being installed on the system, allowing for better error handling. Because volk can be used on all platforms, there is no longer a need for android_wrapper. Thus it has been removed.
Diffstat (limited to 'cube/macOS/cubepp')
-rw-r--r--cube/macOS/cubepp/CMakeLists.txt13
1 files changed, 7 insertions, 6 deletions
diff --git a/cube/macOS/cubepp/CMakeLists.txt b/cube/macOS/cubepp/CMakeLists.txt
index 070ea180..29e5e787 100644
--- a/cube/macOS/cubepp/CMakeLists.txt
+++ b/cube/macOS/cubepp/CMakeLists.txt
@@ -58,8 +58,11 @@ add_dependencies(vkcubepp MoltenVK_icd-staging-json)
# code. Also include the MoltenVK helper files.
target_include_directories(vkcubepp PRIVATE ${CMAKE_CURRENT_LIST_DIR} ${MOLTENVK_DIR}/MoltenVK/include)
-# We do this so vulkaninfo is linked to an individual library and NOT a framework.
-target_link_libraries(vkcubepp Vulkan::Loader "-framework Cocoa -framework QuartzCore")
+# We do this so vkcubepp is linked to an individual library and NOT a framework.
+target_link_libraries(vkcubepp volk::volk_headers "-framework Cocoa -framework QuartzCore")
+
+# Link to MoltenVK directly, so the RPATH is setup
+target_link_libraries(vkcubepp ${MOLTENVK_DIR}/MoltenVK/dylib/macOS/libMoltenVK.dylib)
set_target_properties(vkcubepp PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_LIST_DIR}/Info.plist)
@@ -77,11 +80,9 @@ set_source_files_properties("${PROJECT_BINARY_DIR}/staging-json/MoltenVK_icd.jso
if(XCODE)
add_custom_command(TARGET vkcubepp POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy "${MOLTENVK_DIR}/MoltenVK/dylib/macOS/libMoltenVK.dylib"
- ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/vkcubepp.app/Contents/Frameworks/libMoltenVK.dylib
- DEPENDS vulkan)
+ ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/vkcubepp.app/Contents/Frameworks/libMoltenVK.dylib)
else()
add_custom_command(TARGET vkcubepp POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy "${MOLTENVK_DIR}/MoltenVK/dylib/macOS/libMoltenVK.dylib"
- ${CMAKE_CURRENT_BINARY_DIR}/vkcubepp.app/Contents/Frameworks/libMoltenVK.dylib
- DEPENDS vulkan)
+ ${CMAKE_CURRENT_BINARY_DIR}/vkcubepp.app/Contents/Frameworks/libMoltenVK.dylib)
endif()