mirror of
https://github.com/charles-lunarg/vk-bootstrap.git
synced 2024-11-22 23:24:34 +00:00
cmake: Add VK_BOOTSTRAP_VULKAN_HEADER_DIR build option
This commit is contained in:
parent
07ae8845a7
commit
4211068f10
@ -2,6 +2,13 @@ cmake_minimum_required(VERSION 3.10 FATAL_ERROR)
|
|||||||
project(VulkanBootstrap)
|
project(VulkanBootstrap)
|
||||||
|
|
||||||
add_library(vk-boostrap-vulkan-headers INTERFACE)
|
add_library(vk-boostrap-vulkan-headers INTERFACE)
|
||||||
|
|
||||||
|
set(VK_BOOTSTRAP_VULKAN_HEADER_DIR "" CACHE STRING "Specify the location of the Vulkan-Headers include directory.")
|
||||||
|
mark_as_advanced(VK_BOOTSTRAP_VULKAN_HEADER_DIR)
|
||||||
|
|
||||||
|
if(NOT "${VK_BOOTSTRAP_VULKAN_HEADER_DIR}" STREQUAL "")
|
||||||
|
target_include_directories(vk-boostrap-vulkan-headers INTERFACE ${VK_BOOTSTRAP_VULKAN_HEADER_DIR})
|
||||||
|
else ()
|
||||||
find_package(Vulkan QUIET)
|
find_package(Vulkan QUIET)
|
||||||
|
|
||||||
if(${Vulkan_INCLUDE_DIR} STREQUAL "Vulkan_INCLUDE_DIR-NOTFOUND")
|
if(${Vulkan_INCLUDE_DIR} STREQUAL "Vulkan_INCLUDE_DIR-NOTFOUND")
|
||||||
@ -16,6 +23,7 @@ if(${Vulkan_INCLUDE_DIR} STREQUAL "Vulkan_INCLUDE_DIR-NOTFOUND")
|
|||||||
else()
|
else()
|
||||||
set_target_properties(vk-boostrap-vulkan-headers PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${Vulkan_INCLUDE_DIR})
|
set_target_properties(vk-boostrap-vulkan-headers PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${Vulkan_INCLUDE_DIR})
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
add_library(vk-bootstrap src/VkBootstrap.h src/VkBootstrap.cpp)
|
add_library(vk-bootstrap src/VkBootstrap.h src/VkBootstrap.cpp)
|
||||||
add_library(vk-bootstrap::vk-bootstrap ALIAS vk-bootstrap)
|
add_library(vk-bootstrap::vk-bootstrap ALIAS vk-bootstrap)
|
||||||
|
Loading…
Reference in New Issue
Block a user