installing module and exporting via CXX_MODULES_DIRECTORY
This commit is contained in:
parent
8e12a6c7ff
commit
5407d73452
1 changed files with 17 additions and 5 deletions
|
|
@ -115,14 +115,26 @@ if (VULKAN_HEADERS_ENABLE_INSTALL)
|
||||||
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/registry" DESTINATION "${CMAKE_INSTALL_DATADIR}/vulkan" USE_SOURCE_PERMISSIONS)
|
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/registry" DESTINATION "${CMAKE_INSTALL_DATADIR}/vulkan" USE_SOURCE_PERMISSIONS)
|
||||||
|
|
||||||
set_target_properties(Vulkan-Headers PROPERTIES EXPORT_NAME "Headers")
|
set_target_properties(Vulkan-Headers PROPERTIES EXPORT_NAME "Headers")
|
||||||
list(APPEND INSTALL_TARGETS Vulkan-Headers)
|
|
||||||
if (VULKAN_HEADERS_ENABLE_MODULE)
|
if (VULKAN_HEADERS_ENABLE_MODULE)
|
||||||
|
# install Vulkan-Hpp module alongside headers
|
||||||
set_target_properties(Vulkan-HppModule PROPERTIES EXPORT_NAME "HppModule")
|
set_target_properties(Vulkan-HppModule PROPERTIES EXPORT_NAME "HppModule")
|
||||||
list(APPEND INSTALL_TARGETS Vulkan-HppModule)
|
install(TARGETS Vulkan-Headers Vulkan-HppModule
|
||||||
|
EXPORT VulkanHeadersConfig
|
||||||
|
FILE_SET module DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
||||||
|
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
||||||
|
install(EXPORT VulkanHeadersConfig
|
||||||
|
NAMESPACE "Vulkan::"
|
||||||
|
DESTINATION "share/cmake/VulkanHeaders"
|
||||||
|
CXX_MODULES_DIRECTORY .)
|
||||||
|
else()
|
||||||
|
# only install vulkan headers
|
||||||
|
install(TARGETS Vulkan-Headers
|
||||||
|
EXPORT VulkanHeadersConfig
|
||||||
|
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
||||||
|
install(EXPORT VulkanHeadersConfig
|
||||||
|
NAMESPACE "Vulkan::"
|
||||||
|
DESTINATION "share/cmake/VulkanHeaders")
|
||||||
endif()
|
endif()
|
||||||
install(TARGETS ${INSTALL_TARGETS} EXPORT VulkanHeadersConfig INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
|
||||||
|
|
||||||
install(EXPORT VulkanHeadersConfig NAMESPACE "Vulkan::" DESTINATION "share/cmake/VulkanHeaders")
|
|
||||||
|
|
||||||
set(version_config "${CMAKE_CURRENT_BINARY_DIR}/generated/VulkanHeadersConfigVersion.cmake")
|
set(version_config "${CMAKE_CURRENT_BINARY_DIR}/generated/VulkanHeadersConfigVersion.cmake")
|
||||||
write_basic_package_version_file("${version_config}" COMPATIBILITY SameMajorVersion ARCH_INDEPENDENT)
|
write_basic_package_version_file("${version_config}" COMPATIBILITY SameMajorVersion ARCH_INDEPENDENT)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue