1b2a28edaSopenharmony_cicmake_minimum_required(VERSION 3.0) 2b2a28edaSopenharmony_ci 3b2a28edaSopenharmony_ciproject(TEST_FIND_PACKAGE LANGUAGES CXX) 4b2a28edaSopenharmony_ci 5b2a28edaSopenharmony_ciadd_library(find_package_example STATIC 6b2a28edaSopenharmony_ci ${CMAKE_CURRENT_SOURCE_DIR}/../example.cpp 7b2a28edaSopenharmony_ci) 8b2a28edaSopenharmony_ci 9b2a28edaSopenharmony_cifind_package(SPIRV-Headers REQUIRED CONFIG) 10b2a28edaSopenharmony_ci 11b2a28edaSopenharmony_ciif (NOT TARGET SPIRV-Headers::SPIRV-Headers) 12b2a28edaSopenharmony_ci message(FATAL_ERROR "SPIRV-Headers::SPIRV-Headers target not defined") 13b2a28edaSopenharmony_ciendif() 14b2a28edaSopenharmony_ci 15b2a28edaSopenharmony_citarget_link_libraries(find_package_example PRIVATE 16b2a28edaSopenharmony_ci SPIRV-Headers::SPIRV-Headers 17b2a28edaSopenharmony_ci) 18b2a28edaSopenharmony_ci 19b2a28edaSopenharmony_ciif (NOT DEFINED SPIRV-Headers_VERSION) 20b2a28edaSopenharmony_ci message(FATAL_ERROR "SPIRV-Headers_VERSION not provided!") 21b2a28edaSopenharmony_ciendif() 22b2a28edaSopenharmony_ci 23b2a28edaSopenharmony_cimessage(STATUS "SPIRV-Headers_VERSION = ${SPIRV-Headers_VERSION}") 24