From: Juan Ramos Date: Thu, 5 Oct 2023 17:50:15 +0000 (-0600) Subject: cmake: Don't REQUIRE find_package(VulkanHeaders) X-Git-Tag: upstream/1.3.268~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7417583fc4607f2f35eb0f2d57b378cacca0e4e3;p=platform%2Fupstream%2FVulkan-Loader.git cmake: Don't REQUIRE find_package(VulkanHeaders) Allows use of add_subdirectory with the loader This is the same approach used by the validation layers. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 5b7a4303..d4f0a467 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -45,9 +45,7 @@ if(BUILD_STATIC_LOADER) "or tested as part of the loader. Use it at your own risk.") endif() -if (NOT TARGET Vulkan::Headers) - find_package(VulkanHeaders REQUIRED CONFIG QUIET) -endif() +find_package(VulkanHeaders CONFIG QUIET) include(GNUInstallDirs) diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt index bf4d7c41..4fce83e1 100644 --- a/scripts/CMakeLists.txt +++ b/scripts/CMakeLists.txt @@ -103,6 +103,7 @@ if (UPDATE_DEPS) endif() if (VULKAN_HEADERS_INSTALL_DIR) list(APPEND CMAKE_PREFIX_PATH ${VULKAN_HEADERS_INSTALL_DIR}) + set(CMAKE_REQUIRE_FIND_PACKAGE_VulkanHeaders TRUE PARENT_SCOPE) endif() if (CMAKE_CROSSCOMPILING)