Revised: Update iOS build to support future standarization of FindVulkan.cmake#1516
Open
SRSaunders wants to merge 2 commits intoKhronosGroup:mainfrom
Open
Revised: Update iOS build to support future standarization of FindVulkan.cmake#1516SRSaunders wants to merge 2 commits intoKhronosGroup:mainfrom
SRSaunders wants to merge 2 commits intoKhronosGroup:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Simplifies and replaces closed PR #1500.
This PR updates the iOS build and CI to support future standardization of FindVulkan.cmake where there may be fewer or no project customizations present for iOS build targets. With these changes the project will build and run for iOS and iOS Simulator with OR without the project-specific FindVulkan.cmake present in the tree, i.e. it only depends on the capabilities of cmake's standard version of the module without project-specific iOS customizations. This will permit eventual migration away from the project-specific FindVulkan.cmake. However, in the mean time the project FindVulkan.cmake will remain in place and this PR will not result in any iOS regressions, nor require any doc updates.
The specific items that have changed are:
CMAKE_FIND_ROOT_PATHvariable is defined for iOS builds in the main CMakeLists file. This is to allow the standard non-customized FindVulkan.cmake to locate the iOS frameworks from the SDK. This is the key change that makes this PR work properly. While this adds one small item to the main CMakeLists file, it avoids a more complex approach using an iOS toolchain file (see closed PR Update iOS build and CI to support standardization of FindVulkan.cmake #1500) which is overkill for the solution.Vulkan_Target_SDKcmake variable is now defined locally within Vulkan-Samples/app/CMakeLists.txt vs. depending on its definition within the project's FindVulkan.cmake. This approach makes more sense since this was a project-specific customization of FindVulkan.cmake and is the only location in the project build system (outside of FindVulkan.cmake itself) where this variable is used. Note the purpose of this variable is to locate the directory where Vulkan icd and layer json files can be found - required for packaging an iOS app bundle.Vulkan_Layer_VALIDATIONcmake variable is now located and defined within the iOS-specific section in Vulkan-Samples/bldsys/cmake/global_options.cmake if it's not already defined or found by FindVulkan.cmake. This acts as a fail-safe fallback that avoids any regressions in finding the validation layer for iOS within the project.Fixes iOS build issues associated with pull request #1490. See additional discussion there.
Tested on macOS Sequoia with iOS arm64 and iOS Simulator x86_64 targets.
General Checklist:
Please ensure the following points are checked:
Note: The Samples CI runs a number of checks including:
If this PR contains framework changes:
batchcommand line argument to make sure all samples still work properlySample Checklist
If your PR contains a new or modified sample, these further checks must be carried out in addition to the General Checklist: