Platformer in OpenGL
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 line
1.0 KiB

5 年之前
  1. # Find Vulkan
  2. #
  3. # VULKAN_INCLUDE_DIR
  4. # VULKAN_LIBRARY
  5. # VULKAN_FOUND
  6. if (WIN32)
  7. find_path(VULKAN_INCLUDE_DIR 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_LIBRARY NAMES vulkan-1 HINTS
  12. "$ENV{VULKAN_SDK}/Bin"
  13. "$ENV{VK_SDK_PATH}/Bin")
  14. find_library(VULKAN_STATIC_LIBRARY NAMES vkstatic.1 HINTS
  15. "$ENV{VULKAN_SDK}/Bin"
  16. "$ENV{VK_SDK_PATH}/Bin")
  17. else()
  18. find_library(VULKAN_LIBRARY NAMES vulkan-1 HINTS
  19. "$ENV{VULKAN_SDK}/Bin32"
  20. "$ENV{VK_SDK_PATH}/Bin32")
  21. endif()
  22. else()
  23. find_path(VULKAN_INCLUDE_DIR NAMES vulkan/vulkan.h HINTS
  24. "$ENV{VULKAN_SDK}/include")
  25. find_library(VULKAN_LIBRARY NAMES vulkan HINTS
  26. "$ENV{VULKAN_SDK}/lib")
  27. endif()
  28. include(FindPackageHandleStandardArgs)
  29. find_package_handle_standard_args(Vulkan DEFAULT_MSG VULKAN_LIBRARY VULKAN_INCLUDE_DIR)
  30. mark_as_advanced(VULKAN_INCLUDE_DIR VULKAN_LIBRARY VULKAN_STATIC_LIBRARY)