aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/find_package/CMakeLists.txt23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/find_package/CMakeLists.txt b/tests/find_package/CMakeLists.txt
new file mode 100644
index 0000000..f042bdc
--- /dev/null
+++ b/tests/find_package/CMakeLists.txt
@@ -0,0 +1,23 @@
+cmake_minimum_required(VERSION 3.10.2)
+
+project(TEST_VULKAN_HEADERS_FIND_PACKAGE_SUPPORT LANGUAGES C)
+
+find_package(VulkanHeaders REQUIRED CONFIG)
+
+if (NOT TARGET Vulkan::Headers)
+ message(FATAL_ERROR "Vulkan::Headers target not defined")
+endif()
+
+if (NOT DEFINED VULKAN_HEADERS_REGISTRY_DIRECTORY)
+ message(FATAL_ERROR "VULKAN_HEADERS_REGISTRY_DIRECTORY not defined!")
+endif()
+
+if (NOT EXISTS "${VULKAN_HEADERS_REGISTRY_DIRECTORY}/vk.xml")
+ message(FATAL_ERROR "VULKAN_HEADERS_REGISTRY_DIRECTORY not valid!")
+endif()
+message(STATUS "VULKAN_HEADERS_REGISTRY_DIRECTORY = ${VULKAN_HEADERS_REGISTRY_DIRECTORY}")
+
+if (NOT DEFINED VulkanHeaders_VERSION)
+ message(FATAL_ERROR "VulkanHeaders_VERSION not defined!")
+endif()
+message(STATUS "VulkanHeaders_VERSION = ${VulkanHeaders_VERSION}")