summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineVulkan
diff options
context:
space:
mode:
authorassiduous <assiduous@diligentgraphics.com>2021-02-04 06:45:03 +0000
committerassiduous <assiduous@diligentgraphics.com>2021-02-04 06:45:03 +0000
commit30f6c40c138e6e535d2c1d13c8679111b12415fa (patch)
treee19ab4b91011bab2216e644d877738c386c093ef /Graphics/GraphicsEngineVulkan
parentDisabled (for now) linking with simulator MoltenVK library to fix the iOS build (diff)
downloadDiligentCore-30f6c40c138e6e535d2c1d13c8679111b12415fa.tar.gz
DiligentCore-30f6c40c138e6e535d2c1d13c8679111b12415fa.zip
CMake: added selection of simulator or device MoltenVK library for iOS
Diffstat (limited to 'Graphics/GraphicsEngineVulkan')
-rw-r--r--Graphics/GraphicsEngineVulkan/CMakeLists.txt15
1 files changed, 9 insertions, 6 deletions
diff --git a/Graphics/GraphicsEngineVulkan/CMakeLists.txt b/Graphics/GraphicsEngineVulkan/CMakeLists.txt
index f4f0aa35..2c02b7c9 100644
--- a/Graphics/GraphicsEngineVulkan/CMakeLists.txt
+++ b/Graphics/GraphicsEngineVulkan/CMakeLists.txt
@@ -266,12 +266,15 @@ if(PLATFORM_WIN32)
elseif(PLATFORM_MACOS)
# Use Volk
elseif(PLATFORM_IOS)
- # For the apparent lack of a better way, link with both arm64 and x64 libraries.
- # The linker will issue a warning, but this will work for both device and the simulator.
- list(APPEND PRIVATE_DEPENDENCIES
- "${MoltenVK_FRAMEWORK}/ios-arm64/libMoltenVK.a"
- #"${MoltenVK_FRAMEWORK}/ios-arm64_x86_64-simulator/libMoltenVK.a"
- )
+ if(CMAKE_OSX_SYSROOT STREQUAL "iphonesimulator" OR PLATFORM_IOS_SIMULATOR)
+ list(APPEND PRIVATE_DEPENDENCIES
+ "${MoltenVK_FRAMEWORK}/ios-arm64_x86_64-simulator/libMoltenVK.a"
+ )
+ else()
+ list(APPEND PRIVATE_DEPENDENCIES
+ "${MoltenVK_FRAMEWORK}/ios-arm64/libMoltenVK.a"
+ )
+ endif()
find_library(CORE_GRAPHICS CoreGraphics)
find_library(METAL_LIBRARY Metal)