mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 21:31:08 -06:00
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
This commit is contained in:
@@ -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})
|
||||
|
||||
Reference in New Issue
Block a user