summaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorJuan Ramos <[email protected]>2023-03-15 13:51:43 -0600
committerJuan Ramos <[email protected]>2023-03-15 13:55:17 -0600
commit65ad768d8603671fc1085fe115019e72a595ced8 (patch)
treef91f0366b75d2d4da826aa20d1e6c156dd604599 /tests
parentd732b2de303ce505169011d438178191136bfb00 (diff)
downloadVulkan-Headers-65ad768d8603671fc1085fe115019e72a595ced8.tar.gz
Vulkan-Headers-65ad768d8603671fc1085fe115019e72a595ced8.zip
cmake: Minor CMake cleanupsdk-1.3.243.0sdk-1.3.243
- Fix project name to be less confusing - Better testing
Diffstat (limited to 'tests')
-rw-r--r--tests/CMakeLists.txt6
-rw-r--r--tests/find_package/CMakeLists.txt13
2 files changed, 17 insertions, 2 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index eab59fa..e24f3d2 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -18,6 +18,8 @@
# NOTE: For us testing just means that these header files compile
# with reasonable warnings.
+message(STATUS "${PROJECT_NAME} = ${PROJECT_VERSION}")
+
set(CMAKE_C_STANDARD 99)
set(CMAKE_C_STANDARD_REQUIRED ON)
set(CMAKE_C_EXTENSIONS OFF)
@@ -38,3 +40,7 @@ target_link_libraries(vk_icd PRIVATE Vulkan::Headers)
# vk_layer.h
add_library(vk_layer MODULE vk_layer.c)
target_link_libraries(vk_layer PRIVATE Vulkan::Headers)
+
+if (NOT TARGET Vulkan-Headers)
+ message(FATAL_ERROR "Backcompat for Vulkan-Headers target broken!")
+endif()
diff --git a/tests/find_package/CMakeLists.txt b/tests/find_package/CMakeLists.txt
index f042bdc..d9f32a4 100644
--- a/tests/find_package/CMakeLists.txt
+++ b/tests/find_package/CMakeLists.txt
@@ -1,8 +1,8 @@
-cmake_minimum_required(VERSION 3.10.2)
+cmake_minimum_required(VERSION 3.14.2)
project(TEST_VULKAN_HEADERS_FIND_PACKAGE_SUPPORT LANGUAGES C)
-find_package(VulkanHeaders REQUIRED CONFIG)
+find_package(VulkanHeaders REQUIRED CONFIG)
if (NOT TARGET Vulkan::Headers)
message(FATAL_ERROR "Vulkan::Headers target not defined")
@@ -21,3 +21,12 @@ if (NOT DEFINED VulkanHeaders_VERSION)
message(FATAL_ERROR "VulkanHeaders_VERSION not defined!")
endif()
message(STATUS "VulkanHeaders_VERSION = ${VulkanHeaders_VERSION}")
+
+add_library(foobar STATIC)
+
+target_link_libraries(foobar PRIVATE Vulkan::Headers)
+
+target_sources(foobar PRIVATE
+ ../vk_icd.c
+ ../vk_layer.c
+)