From 16d17ebf3762f24b3eb06e04843efb7f7dbf8438 Mon Sep 17 00:00:00 2001 From: Caio Marcelo de Oliveira Filho Date: Tue, 10 Dec 2019 11:23:23 -0800 Subject: [PATCH] build: Fix Vulkan registry detection Fix incomplete VULKAN_REGISTRY_PATH_HINT for the case where VULKAN_HEADERS_INSTALL_DIR is not specified. The hint extracted the DIRECTORY of the include dir (e.g. "/usr"), but missed the rest of the expected path for finding vk.xml (e.g. "/usr/share/vulkan/registry"). Tested with CMake 3.16.0. Fixes: 18664450a ("build: Fix Vulkan headers detection with CMake.") --- cmake/FindVulkanHeaders.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/FindVulkanHeaders.cmake b/cmake/FindVulkanHeaders.cmake index 68e261159..1c71ffe10 100644 --- a/cmake/FindVulkanHeaders.cmake +++ b/cmake/FindVulkanHeaders.cmake @@ -76,7 +76,7 @@ else() # do a normal search without hints. find_path(VulkanHeaders_INCLUDE_DIR NAMES vulkan/vulkan.h) get_filename_component(VULKAN_REGISTRY_PATH_HINT ${VulkanHeaders_INCLUDE_DIR} DIRECTORY) - find_path(VulkanRegistry_DIR NAMES vk.xml HINTS ${VULKAN_REGISTRY_PATH_HINT}) + find_path(VulkanRegistry_DIR NAMES vk.xml HINTS /usr/share/vulkan/registry) endif() set(VulkanHeaders_INCLUDE_DIRS ${VulkanHeaders_INCLUDE_DIR})