vk-bootstrap/example/CMakeLists.txt
Charles Giessen f223c8d5ae Cleanup CMake finding of Vulkan & installation code
Adds extensive integration tests that exercise the various ways of finding
the Vulkan-Headers.

vk-bootstrap should now use the Vulkan-Headers or Vulkan::Headers targets if
they were already defined (such as is the case of FetchContent), and will
look for the VulkanHeaders package and Vulkan package as a fallback, and will
FetchContent Vulkan-Headers directly if that fails.

This should make integration seamless with the various ways vulkan-headers
is acquired.

The vk-bootstrap-vulkan-headers target was dropped in favor of directly
linking to Vulkan-Headers (creating a target by that name if none exists).
2023-12-02 19:49:54 -07:00

22 lines
693 B
CMake

add_executable(vk-bootstrap-triangle triangle.cpp)
target_link_libraries(vk-bootstrap-triangle
PRIVATE
glfw
vk-bootstrap
vk-bootstrap-compiler-warnings
Vulkan::Headers)
target_include_directories(vk-bootstrap-triangle PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) # path to build directory for shaders
add_custom_command(
TARGET vk-bootstrap-triangle
POST_BUILD
COMMAND
${CMAKE_COMMAND} -E copy_directory
${CMAKE_SOURCE_DIR}/example/shaders ${CMAKE_CURRENT_BINARY_DIR}
DEPENDS ${CMAKE_CURRENT_BINARY_DIR})
configure_file (
"${PROJECT_SOURCE_DIR}/example/example_config.h.in"
"${CMAKE_CURRENT_BINARY_DIR}/example_config.h"
)