Merge remote-tracking branch 'upstream/3.4' into merge-3.4
[platform/upstream/opencv.git] / cmake / FindVulkan.cmake
1 # Find Vulkan
2 #
3 # Vulkan_INCLUDE_DIRS
4 # Vulkan_LIBRARIES
5 # Vulkan_FOUND
6 if (WIN32)
7     find_path(Vulkan_INCLUDE_DIRS NAMES vulkan/vulkan.h HINTS
8         "$ENV{VULKAN_SDK}/Include"
9         "$ENV{VK_SDK_PATH}/Include")
10     if (CMAKE_CL_64)
11         find_library(Vulkan_LIBRARIES NAMES vulkan-1 HINTS
12             "$ENV{VULKAN_SDK}/Bin"
13             "$ENV{VK_SDK_PATH}/Bin")
14     else()
15         find_library(Vulkan_LIBRARIES NAMES vulkan-1 HINTS
16             "$ENV{VULKAN_SDK}/Bin32"
17             "$ENV{VK_SDK_PATH}/Bin32")
18     endif()
19 else()
20     find_path(Vulkan_INCLUDE_DIRS NAMES vulkan/vulkan.h HINTS
21         "$ENV{VULKAN_SDK}/include")
22     find_library(Vulkan_LIBRARIES NAMES vulkan HINTS
23         "$ENV{VULKAN_SDK}/lib")
24 endif()
25 include(FindPackageHandleStandardArgs)
26 find_package_handle_standard_args(Vulkan DEFAULT_MSG Vulkan_LIBRARIES Vulkan_INCLUDE_DIRS)
27 mark_as_advanced(Vulkan_INCLUDE_DIRS Vulkan_LIBRARIES)