Isolating generator targets and creating header-only interface target #2042
+26
−18
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.
Resolves #2037
New CMake option
VULKAN_HPP_GENERATOR_BUILD
to control the creation of bothVulkanHppGenerator
andVideoHppGenerator
targets, defaulting toON
as to not break anything.Naming was based on
VULKAN_HPP_SAMPLES_BUILD
andVULKAN_HPP_TESTS_BUILD
, could otherwise rename toVULKAN_HPP_BUILD_GENERATOR
to fitVULKAN_HPP_RUN_GENERATOR
naming scheme.Also created the
Vulkan-Hpp
interface target, aliased asVulkan::Hpp
for those just looking to get the include directory. Naming is akin to the Vulkan-Headers with theirVulkan-Headers
interface target, aliased asVulkan::Headers
.The target is always created and it might make sense to use it in the other build targets as a unified way to include the generated headers? Otherwise it can be hidden behind a CMake option or function if necessary.
This PR would allow fetching a specific version of Vulkan headers using the following CMake syntax: