Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,9 @@ jobs:
- name: retrieve VulkanSDK
if: steps.VulkanSDK.outputs.cache-hit != 'true'
run: |
wget https://sdk.lunarg.com/sdk/download/1.4.304.1/mac/vulkansdk-macos-1.4.304.1.zip
unzip vulkansdk-macos-1.4.304.1.zip
sudo InstallVulkan-1.4.304.1.app/Contents/MacOS/InstallVulkan-1.4.304.1 --root ~/VulkanSDK --accept-licenses --default-answer --confirm-command install com.lunarg.vulkan.ios
wget https://sdk.lunarg.com/sdk/download/1.4.341.1/mac/vulkansdk-macos-1.4.341.1.zip
unzip vulkansdk-macos-1.4.341.1.zip
sudo vulkansdk-macOS-1.4.341.1.app/Contents/MacOS/vulkansdk-macOS-1.4.341.1 --root ~/VulkanSDK --accept-licenses --default-answer --confirm-command install com.lunarg.vulkan.ios

- name: build_ios
run: |
Expand Down
11 changes: 8 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright (c) 2020-2025, Arm Limited and Contributors
# Copyright (c) 2024-2025, Mobica Limited
# Copyright (c) 2024-2025, Sascha Willems
# Copyright (c) 2020-2026, Arm Limited and Contributors
# Copyright (c) 2024-2026, Mobica Limited
# Copyright (c) 2024-2026, Sascha Willems
#
# SPDX-License-Identifier: Apache-2.0
#
Expand Down Expand Up @@ -40,6 +40,11 @@ project(vulkan_samples)
if(VKB_GENERATE_ANTORA_SITE)
add_subdirectory(antora)
else ()
# On IOS we define CMAKE_FIND_ROOT_PATH to allow find_package(Vulkan) to locate the Vulkan frameworks for iOS
if(IOS)
set(CMAKE_FIND_ROOT_PATH "$ENV{VULKAN_SDK}")
endif()

# search for Vulkan SDK
find_package(Vulkan)

Expand Down
3 changes: 2 additions & 1 deletion app/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2019-2025, Arm Limited and Contributors
# Copyright (c) 2019-2026, Arm Limited and Contributors
#
# SPDX-License-Identifier: Apache-2.0
#
Expand Down Expand Up @@ -137,6 +137,7 @@ if(IOS)
endif ()
# Vulkan cache variables already defined by main project CMakeLists and updated on Apple platforms by global_options.cmake
if(Vulkan_LIBRARY AND ${Vulkan_VERSION} VERSION_GREATER_EQUAL 1.3.278)
get_filename_component(Vulkan_Target_SDK "$ENV{VULKAN_SDK}/.." REALPATH)
target_sources(${PROJECT_NAME} PRIVATE
${Vulkan_Target_SDK}/iOS/share/vulkan
)
Expand Down
10 changes: 5 additions & 5 deletions bldsys/cmake/global_options.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#[[
Copyright (c) 2019-2025, Arm Limited and Contributors
Copyright (c) 2019-2026, Arm Limited and Contributors

SPDX-License-Identifier: Apache-2.0

Expand Down Expand Up @@ -78,10 +78,10 @@ if(APPLE)
else()
message(FATAL_ERROR "Can't find MoltenVK library. Please install the Vulkan SDK or MoltenVK project and set VULKAN_SDK.")
endif()
#elseif(OTHER_VULKAN_DRIVER)
# handle any special processing here for other Vulkan driver (e.g. KosmicKrisp) for standalone usage on macOS or deployment to iOS
# would likely require extensions to CMake find_package() OPTIONAL_COMPONENTS and library variables to identify & use other driver
#else()
elseif(IOS AND NOT Vulkan_Layer_VALIDATION)
# if building for iOS devices (not iOS Simulator as above) and Vulkan_Layer_VALIDATION is not defined or found, search in the Vulkan SDK
find_library(Vulkan_Layer_VALIDATION NAMES VkLayer_khronos_validation HINTS "$ENV{VULKAN_SDK}/lib")
else()
# if not using standalone driver, retain find_package() results for Vulkan driver, Vulkan loader, and Validation Layer library variables
# no need to override with _HPP_VULKAN_LIBRARY in this case since Vulkan DynamicLoader will find/load Vulkan library on macOS & iOS
endif()
Expand Down
Loading