2015-08-10 20:19:04 +02:00
|
|
|
# Find Vulkan
|
|
|
|
#
|
|
|
|
# VULKAN_INCLUDE_DIR
|
|
|
|
# VULKAN_LIBRARY
|
|
|
|
# VULKAN_FOUND
|
|
|
|
|
|
|
|
if (WIN32)
|
|
|
|
find_path(VULKAN_INCLUDE_DIR NAMES vulkan/vulkan.h HINTS
|
2016-03-05 23:56:40 +01:00
|
|
|
"$ENV{VULKAN_SDK}/Include"
|
2015-08-10 20:19:04 +02:00
|
|
|
"$ENV{VK_SDK_PATH}/Include")
|
2017-01-04 21:57:41 +01:00
|
|
|
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
|
2016-02-17 08:26:45 +01:00
|
|
|
find_library(VULKAN_LIBRARY NAMES vulkan-1 HINTS
|
2017-02-27 23:55:52 +01:00
|
|
|
"$ENV{VULKAN_SDK}/Lib"
|
2016-03-05 23:56:40 +01:00
|
|
|
"$ENV{VULKAN_SDK}/Bin"
|
2016-02-17 08:26:45 +01:00
|
|
|
"$ENV{VK_SDK_PATH}/Bin")
|
2016-08-05 00:23:16 +02:00
|
|
|
find_library(VULKAN_STATIC_LIBRARY NAMES vkstatic.1 HINTS
|
2017-02-27 23:55:52 +01:00
|
|
|
"$ENV{VULKAN_SDK}/Lib"
|
2016-08-05 00:23:16 +02:00
|
|
|
"$ENV{VULKAN_SDK}/Bin"
|
|
|
|
"$ENV{VK_SDK_PATH}/Bin")
|
2016-02-17 08:26:45 +01:00
|
|
|
else()
|
|
|
|
find_library(VULKAN_LIBRARY NAMES vulkan-1 HINTS
|
2017-02-27 23:55:52 +01:00
|
|
|
"$ENV{VULKAN_SDK}/Lib32"
|
2016-03-05 23:56:40 +01:00
|
|
|
"$ENV{VULKAN_SDK}/Bin32"
|
2016-02-17 08:26:45 +01:00
|
|
|
"$ENV{VK_SDK_PATH}/Bin32")
|
2017-02-27 23:44:03 +01:00
|
|
|
find_library(VULKAN_STATIC_LIBRARY NAMES vkstatic.1 HINTS
|
2017-02-27 23:55:52 +01:00
|
|
|
"$ENV{VULKAN_SDK}/Lib32"
|
2017-02-27 23:44:03 +01:00
|
|
|
"$ENV{VULKAN_SDK}/Bin32"
|
|
|
|
"$ENV{VK_SDK_PATH}/Bin32")
|
2016-02-17 08:26:45 +01:00
|
|
|
endif()
|
2015-08-10 20:19:04 +02:00
|
|
|
else()
|
|
|
|
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()
|
|
|
|
|
|
|
|
include(FindPackageHandleStandardArgs)
|
|
|
|
find_package_handle_standard_args(Vulkan DEFAULT_MSG VULKAN_LIBRARY VULKAN_INCLUDE_DIR)
|
|
|
|
|
2016-08-05 00:23:16 +02:00
|
|
|
mark_as_advanced(VULKAN_INCLUDE_DIR VULKAN_LIBRARY VULKAN_STATIC_LIBRARY)
|
2015-08-10 20:19:04 +02:00
|
|
|
|