summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-05-07 13:34:31 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-05-07 13:34:41 (GMT)
commit07d567c0ce7dda5168df20b4b941864277ea7032 (patch)
treeb44d7094f3406b7e7d485e0bef004a2c5f95c740 /Modules
parent0dcb436fab6f21b5e5ada5ee2acb04870447ab37 (diff)
parent590cde6125f4ad787dacfe2f0fbd767ca2e48b5d (diff)
downloadCMake-07d567c0ce7dda5168df20b4b941864277ea7032.zip
CMake-07d567c0ce7dda5168df20b4b941864277ea7032.tar.gz
CMake-07d567c0ce7dda5168df20b4b941864277ea7032.tar.bz2
Merge topic 'FindVulkan-use-SDK-env-variable'
590cde6125 FindVulkan: Prefer VULKAN_SDK env var before standard paths on UNIX Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4714
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindVulkan.cmake23
1 files changed, 15 insertions, 8 deletions
diff --git a/Modules/FindVulkan.cmake b/Modules/FindVulkan.cmake
index 7603124..4b999b6 100644
--- a/Modules/FindVulkan.cmake
+++ b/Modules/FindVulkan.cmake
@@ -28,6 +28,15 @@ The module will also define two cache variables::
Vulkan_INCLUDE_DIR - the Vulkan include directory
Vulkan_LIBRARY - the path to the Vulkan library
+Hints
+^^^^^
+
+The ``VULKAN_SDK`` environment variable optionally specifies the
+location of the Vulkan SDK root directory for the given
+architecture. It is typically set by sourcing the toplevel
+``setup-env.sh`` script of the Vulkan SDK directory into the shell
+environment.
+
#]=======================================================================]
if(WIN32)
@@ -53,14 +62,12 @@ if(WIN32)
)
endif()
else()
- find_path(Vulkan_INCLUDE_DIR
- NAMES vulkan/vulkan.h
- PATHS
- "$ENV{VULKAN_SDK}/include")
- find_library(Vulkan_LIBRARY
- NAMES vulkan
- PATHS
- "$ENV{VULKAN_SDK}/lib")
+ find_path(Vulkan_INCLUDE_DIR
+ NAMES vulkan/vulkan.h
+ HINTS "$ENV{VULKAN_SDK}/include")
+ find_library(Vulkan_LIBRARY
+ NAMES vulkan
+ HINTS "$ENV{VULKAN_SDK}/lib")
endif()
set(Vulkan_LIBRARIES ${Vulkan_LIBRARY})