mirror of
https://github.com/KhronosGroup/Vulkan-Headers
synced 2024-11-21 06:26:00 -07:00
cmake: Add VULKAN_HEADERS_INSTALL option
This allows projects which consume this repo with add_subdirectory to turn on/off the install logic, which can be undesirable.
This commit is contained in:
parent
9cc8473bb9
commit
e55c3116c1
1 changed files with 8 additions and 1 deletions
|
@ -28,4 +28,11 @@ add_library(Vulkan-Registry INTERFACE)
|
|||
target_include_directories(Vulkan-Registry INTERFACE $<BUILD_INTERFACE:"${CMAKE_CURRENT_SOURCE_DIR}/registry">)
|
||||
add_library(Vulkan::Registry ALIAS Vulkan-Registry)
|
||||
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/install.cmake)
|
||||
# https://cmake.org/cmake/help/latest/variable/PROJECT_IS_TOP_LEVEL.html
|
||||
string(COMPARE EQUAL ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR} PROJECT_IS_TOP_LEVEL)
|
||||
|
||||
option(VULKAN_HEADERS_INSTALL "Install Vulkan Headers" ${PROJECT_IS_TOP_LEVEL})
|
||||
|
||||
if (VULKAN_HEADERS_INSTALL)
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/install.cmake)
|
||||
endif()
|
||||
|
|
Loading…
Reference in a new issue