mirror of
https://github.com/gwm17/glfw.git
synced 2024-11-26 20:28:49 -05:00
7c3706763a
Cleanup of 8bdb105897
.
Add build macro to configuration header and documentation. Add
corresponding CMake option. Add change log entry and credit. Add
loader static library to link dependencies and add detection to
FindVulkan.cmake.
35 lines
1.0 KiB
CMake
35 lines
1.0 KiB
CMake
# Find Vulkan
|
|
#
|
|
# VULKAN_INCLUDE_DIR
|
|
# VULKAN_LIBRARY
|
|
# VULKAN_FOUND
|
|
|
|
if (WIN32)
|
|
find_path(VULKAN_INCLUDE_DIR NAMES vulkan/vulkan.h HINTS
|
|
"$ENV{VULKAN_SDK}/Include"
|
|
"$ENV{VK_SDK_PATH}/Include")
|
|
if (CMAKE_CL_64)
|
|
find_library(VULKAN_LIBRARY NAMES vulkan-1 HINTS
|
|
"$ENV{VULKAN_SDK}/Bin"
|
|
"$ENV{VK_SDK_PATH}/Bin")
|
|
find_library(VULKAN_STATIC_LIBRARY NAMES vkstatic.1 HINTS
|
|
"$ENV{VULKAN_SDK}/Bin"
|
|
"$ENV{VK_SDK_PATH}/Bin")
|
|
else()
|
|
find_library(VULKAN_LIBRARY NAMES vulkan-1 HINTS
|
|
"$ENV{VULKAN_SDK}/Bin32"
|
|
"$ENV{VK_SDK_PATH}/Bin32")
|
|
endif()
|
|
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)
|
|
|
|
mark_as_advanced(VULKAN_INCLUDE_DIR VULKAN_LIBRARY VULKAN_STATIC_LIBRARY)
|
|
|