
Generate VulkanHeadersConfig.cmake and version file and install them. To get the version information the header file vulkan_core.h is parsed. In client code one can use `find_package(VulkanHeaders)` and get the targets `Vulkan::Headers` and `Vulkan::Registry`. The following additional files are generated and installed by CMake: - VulkanHeadersConfig.cmake: searched for by find_package(VulkanHeaders) - VulkanHeadersConfigVersion.cmake: provides version numbers - VulkanHeadersTargets.cmake: CMake target definitions used by config file
26 lines
788 B
CMake
26 lines
788 B
CMake
@PACKAGE_INIT@
|
|
|
|
include("${CMAKE_CURRENT_LIST_DIR}/@TARGETS_EXPORT_NAME@.cmake")
|
|
check_required_components("@PROJECT_NAME@")
|
|
|
|
# ALIAS for imported target requires CMake >= 3.11:
|
|
# - https://cmake.org/cmake/help/latest/release/3.11.html#other
|
|
if(NOT CMAKE_VERSION VERSION_LESS 3.11)
|
|
if(NOT TARGET Vulkan::Headers)
|
|
set_target_properties(
|
|
Vulkan::Vulkan-Headers
|
|
PROPERTIES
|
|
IMPORTED_GLOBAL True
|
|
)
|
|
add_library(Vulkan::Headers ALIAS Vulkan::Vulkan-Headers)
|
|
endif()
|
|
if(NOT TARGET Vulkan::Registry)
|
|
set_target_properties(
|
|
Vulkan::Vulkan-Registry
|
|
PROPERTIES
|
|
IMPORTED_GLOBAL True
|
|
)
|
|
add_library(Vulkan::Registry ALIAS Vulkan::Vulkan-Registry)
|
|
endif()
|
|
endif()
|