cmake: Use ${VULKAN_SDK} environment variable paths prior to the system default paths.
authorChang Chen <shchenchang@gmail.com>
Fri, 24 Jun 2022 03:23:22 +0000 (11:23 +0800)
committerCharles Giessen <46324611+charles-lunarg@users.noreply.github.com>
Fri, 24 Jun 2022 20:38:05 +0000 (14:38 -0600)
cmake/FindVulkan.cmake

index 1f4c8ad..846708e 100644 (file)
 if(WIN32)
   find_path(Vulkan_INCLUDE_DIR
     NAMES vulkan/vulkan.h
-    PATHS
+    HINTS
       "$ENV{VULKAN_SDK}/Include"
     )
 
   if(CMAKE_SIZEOF_VOID_P EQUAL 8)
     find_library(Vulkan_LIBRARY
       NAMES vulkan-1
-      PATHS
+      HINTS
         "$ENV{VULKAN_SDK}/Lib"
         "$ENV{VULKAN_SDK}/Bin"
         )
   elseif(CMAKE_SIZEOF_VOID_P EQUAL 4)
     find_library(Vulkan_LIBRARY
       NAMES vulkan-1
-      PATHS
+      HINTS
         "$ENV{VULKAN_SDK}/Lib32"
         "$ENV{VULKAN_SDK}/Bin32"
         NO_SYSTEM_ENVIRONMENT_PATH
@@ -54,11 +54,11 @@ if(WIN32)
 else()
     find_path(Vulkan_INCLUDE_DIR
       NAMES vulkan/vulkan.h
-      PATHS
+      HINTS
         "$ENV{VULKAN_SDK}/include")
     find_library(Vulkan_LIBRARY
       NAMES vulkan
-      PATHS
+      HINTS
         "$ENV{VULKAN_SDK}/lib")
 endif()