diff options
author | Patric Schmitz <bzk0711@aol.com> | 2020-05-06 11:33:48 (GMT) |
---|---|---|
committer | Patric Schmitz <bzk0711@aol.com> | 2020-05-06 14:07:49 (GMT) |
commit | 590cde6125f4ad787dacfe2f0fbd767ca2e48b5d (patch) | |
tree | 9fac3d41c4bb85ec89f54acb7e19eb7926550d82 /Modules/FindVulkan.cmake | |
parent | 00065e2087ffd854a364507dcd84ef095aff1cc9 (diff) | |
download | CMake-590cde6125f4ad787dacfe2f0fbd767ca2e48b5d.zip CMake-590cde6125f4ad787dacfe2f0fbd767ca2e48b5d.tar.gz CMake-590cde6125f4ad787dacfe2f0fbd767ca2e48b5d.tar.bz2 |
FindVulkan: Prefer VULKAN_SDK env var before standard paths on UNIX
Also document the variable.
Fixes: #18346
Diffstat (limited to 'Modules/FindVulkan.cmake')
-rw-r--r-- | Modules/FindVulkan.cmake | 23 |
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}) |