mirror of
https://github.com/KhronosGroup/Vulkan-Hpp
synced 2024-11-09 22:20:07 +00:00
Add CMakeList target to run generator (#424)
This CL adds the VULKAN_HPP_RUN_GENERATOR option which will run the vulkan hpp generator from CMake if enabled.
This commit is contained in:
parent
dc43cf795f
commit
8f3b1d6f01
@ -89,6 +89,19 @@ set_property(TARGET VulkanHppGenerator PROPERTY CXX_STANDARD 11)
|
||||
|
||||
target_include_directories(VulkanHppGenerator PRIVATE ${VULKAN_HPP_TINYXML2_SRC_DIR})
|
||||
|
||||
option (VULKAN_HPP_RUN_GENERATOR "Run the HPP generator" OFF)
|
||||
if (VULKAN_HPP_RUN_GENERATOR)
|
||||
add_custom_command(
|
||||
COMMAND VulkanHppGenerator
|
||||
OUTPUT "${vulkan_hpp}"
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
|
||||
COMMENT "run VulkanHppGenerator"
|
||||
DEPENDS VulkanHppGenerator "${vk_spec}")
|
||||
|
||||
add_custom_target(build_vulkan_hpp ALL
|
||||
DEPENDS "${vulkan_hpp}" "${vk_spec}")
|
||||
endif()
|
||||
|
||||
option (SAMPLES_BUILD OFF)
|
||||
if (SAMPLES_BUILD)
|
||||
add_subdirectory(glfw)
|
||||
|
Loading…
Reference in New Issue
Block a user