Debian Codegraph @

tests/integration/CMakeLists.txt

raw
1 # ~~~
2 # Copyright (c) 2023 Valve Corporation
3 # Copyright (c) 2023 LunarG, Inc.
4 #
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
8 #
9 # http://www.apache.org/licenses/LICENSE-2.0
10 #
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16 # ~~~
17 cmake_minimum_required(VERSION 3.22.1)
18
19 project(INTEGRATION LANGUAGES C)
20
21 find_package(VulkanLoader REQUIRED CONFIG)
22
23 # The intent is ensuring we don't accidentally change the names of these
24 # targets. Since it would break downstream users.
25 if (NOT TARGET Vulkan::Loader)
26 message(FATAL_ERROR "Vulkan::Loader target not defined!")
27 endif()
28
29 if (NOT DEFINED VulkanLoader_VERSION)
30 message(FATAL_ERROR "VulkanLoader_VERSION not defined!")
31 endif()
32 message(STATUS "VulkanLoader_VERSION = ${VulkanLoader_VERSION}")
33
34 # NOTE: This check is NOT sufficient to ensure vulkan.pc is actually valid
35 find_package(PkgConfig)
36 if(PKG_CONFIG_FOUND)
37 find_file(VULKAN_PC vulkan.pc PATH_SUFFIXES lib/pkgconfig REQUIRED)
38 execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE} --validate ${VULKAN_PC})
39 endif()