aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNuno Subtil <[email protected]>2019-02-07 19:32:29 -0800
committerMike Weiblen <[email protected]>2019-02-28 12:11:24 -0700
commit2ed3359a526b808cc6f06115e2e55bb03699d072 (patch)
tree55382e0bf265ed58aa01b11ff7621454b088c5e4
parent8e2c4cd554b644592a6d904f2c8000ebbd4aa77f (diff)
downloadVulkan-Headers-sdk-1.1.101.0.tar.gz
Vulkan-Headers-sdk-1.1.101.0.zip
build: Define library targets for nested builds-sdk-1.1.101.0
Adds alias interface libraries Vulkan::Headers and Vulkan::Registry that export include paths. These are meant to be used by dependent projects in a nested build configuration to obtain the path to the Vulkan headers and registry directories. Change-Id: I0801f4a23ef654064c1b0878543cd48965954756
-rw-r--r--CMakeLists.txt9
1 files changed, 9 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1c1d81f..2640891 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -36,6 +36,15 @@ endif()
# --------------------------------------------------------------------------------------------------------------------------------
+# define exported targets for nested project builds to consume
+add_library(Vulkan-Headers INTERFACE)
+target_include_directories(Vulkan-Headers INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/include")
+add_library(Vulkan::Headers ALIAS Vulkan-Headers)
+
+add_library(Vulkan-Registry INTERFACE)
+target_include_directories(Vulkan-Registry INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/registry")
+add_library(Vulkan::Registry ALIAS Vulkan-Registry)
+
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/vulkan" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/registry" DESTINATION ${CMAKE_INSTALL_DATADIR}/vulkan)