mirror of
https://github.com/KhronosGroup/Vulkan-Headers
synced 2024-11-21 06:26:00 -07:00
ci: Test find_package support
This commit is contained in:
parent
bc6beaa960
commit
d0f8581c60
2 changed files with 26 additions and 1 deletions
4
.github/workflows/linux.yml
vendored
4
.github/workflows/linux.yml
vendored
|
@ -34,7 +34,9 @@ jobs:
|
|||
- name: Configure Vulkan-Headers
|
||||
run: cmake -S . -B build
|
||||
- name: Install Vulkan-Headers
|
||||
run: cmake --install build --prefix build/install
|
||||
run: cmake --install build --prefix ${GITHUB_WORKSPACE}/build/install
|
||||
- name: Test Vulkan-Headers find_package support
|
||||
run: cmake -S tests/find_package -B build/tests/find_package -D CMAKE_PREFIX_PATH=${GITHUB_WORKSPACE}/build/install
|
||||
|
||||
# Enable testing
|
||||
ubuntu-cmake-tests:
|
||||
|
|
23
tests/find_package/CMakeLists.txt
Normal file
23
tests/find_package/CMakeLists.txt
Normal file
|
@ -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}")
|
Loading…
Reference in a new issue