Add building of vulkan_video.hpp to default build process. (#1793)

This commit is contained in:
Andreas Süßenbach 2024-02-06 15:11:31 +01:00 committed by GitHub
parent a3ecb02131
commit 525429d181
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -380,11 +380,12 @@ if( VULKAN_HPP_RUN_GENERATOR )
set( VulkanHeaders_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}" ) set( VulkanHeaders_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}" )
endif() endif()
endif() endif()
file( TO_NATIVE_PATH ${VulkanHeaders_INCLUDE_DIR}/vulkan/vulkan.hpp vulkan_hpp ) file( TO_NATIVE_PATH ${VulkanHeaders_INCLUDE_DIR}/vulkan/vulkan.hpp vulkan_hpp )
string( REPLACE "\\" "\\\\" vulkan_hpp ${vulkan_hpp} ) string( REPLACE "\\" "\\\\" vulkan_hpp ${vulkan_hpp} )
add_custom_command( add_custom_command(
COMMAND VulkanHppGenerator COMMAND VulkanHppGenerator -api vulkan
COMMAND VulkanHppGenerator -api vulkansc COMMAND VulkanHppGenerator -api vulkansc
OUTPUT "${vulkan_hpp}" OUTPUT "${vulkan_hpp}"
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
@ -392,13 +393,16 @@ if( VULKAN_HPP_RUN_GENERATOR )
DEPENDS VulkanHppGenerator "${vk_spec}" ) DEPENDS VulkanHppGenerator "${vk_spec}" )
add_custom_target( build_vulkan_hpp ALL DEPENDS "${vulkan_hpp}" "${vk_spec}" ) add_custom_target( build_vulkan_hpp ALL DEPENDS "${vulkan_hpp}" "${vk_spec}" )
file( TO_NATIVE_PATH ${VulkanHeaders_INCLUDE_DIR}/vulkan/vulkan_video.hpp vulkan_video_hpp )
string( REPLACE "\\" "\\\\" vulkan_video_hpp ${vulkan_video_hpp} )
add_custom_command( add_custom_command(
COMMAND VideoHppGenerator COMMAND VideoHppGenerator
OUTPUT "${vulkan_video_hpp}" OUTPUT "${vulkan_video_hpp}"
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
COMMENT "run VulkanVideoGenerator" COMMENT "run VideoHppGenerator"
DEPENDS VulkanVideoGenerator "${video_spec}" ) DEPENDS VideoHppGenerator "${video_spec}" )
add_custom_target( build_vulkan_video ALL DEPENDS "${vulkan_video_hpp}" "${video_spec}" ) add_custom_target( build_video_hpp ALL DEPENDS "${vulkan_video_hpp}" "${video_spec}" )
endif() endif()
if( VULKAN_HPP_SAMPLES_BUILD ) if( VULKAN_HPP_SAMPLES_BUILD )
@ -427,12 +431,13 @@ if( ${VULKAN_HPP_INSTALL} )
${VulkanHeaders_INCLUDE_DIR}/vulkan/vulkan_handles.hpp ${VulkanHeaders_INCLUDE_DIR}/vulkan/vulkan_handles.hpp
${VulkanHeaders_INCLUDE_DIR}/vulkan/vulkan_hash.hpp ${VulkanHeaders_INCLUDE_DIR}/vulkan/vulkan_hash.hpp
${VulkanHeaders_INCLUDE_DIR}/vulkan/vulkan_hpp_macros.hpp ${VulkanHeaders_INCLUDE_DIR}/vulkan/vulkan_hpp_macros.hpp
${VulkanHeaders_INCLUDE_DIR}/vulkan/vulkan.hpp
${VulkanHeaders_INCLUDE_DIR}/vulkan/vulkan_raii.hpp ${VulkanHeaders_INCLUDE_DIR}/vulkan/vulkan_raii.hpp
${VulkanHeaders_INCLUDE_DIR}/vulkan/vulkan_static_assertions.hpp ${VulkanHeaders_INCLUDE_DIR}/vulkan/vulkan_static_assertions.hpp
${VulkanHeaders_INCLUDE_DIR}/vulkan/vulkan_structs.hpp ${VulkanHeaders_INCLUDE_DIR}/vulkan/vulkan_structs.hpp
${VulkanHeaders_INCLUDE_DIR}/vulkan/vulkan_to_string.hpp ${VulkanHeaders_INCLUDE_DIR}/vulkan/vulkan_to_string.hpp
${VulkanHeaders_INCLUDE_DIR}/vulkan/vulkan_video.hpp
${VulkanHeaders_INCLUDE_DIR}/vulkan/vulkan.cppm ${VulkanHeaders_INCLUDE_DIR}/vulkan/vulkan.cppm
${VulkanHeaders_INCLUDE_DIR}/vulkan/vulkan.hpp
) )
install( FILES ${VK_GENERATED_VULKAN_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/vulkan ) install( FILES ${VK_GENERATED_VULKAN_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/vulkan )