-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support FreeBSD. Update README.md
- Loading branch information
Showing
10 changed files
with
275 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying | ||
# file Copyright.txt or https://cmake.org/licensing for details. | ||
#.rst: | ||
# FindVulkan | ||
# ---------- | ||
# | ||
# Try to find Vulkan | ||
# | ||
# IMPORTED Targets | ||
# ^^^^^^^^^^^^^^^^ | ||
# | ||
# This module defines :prop_tgt:`IMPORTED` target ``Vulkan::Vulkan``, if | ||
# Vulkan has been found. | ||
# | ||
# Result Variables | ||
# ^^^^^^^^^^^^^^^^ | ||
# | ||
# This module defines the following variables:: | ||
# | ||
# Vulkan_FOUND - True if Vulkan was found | ||
# Vulkan_INCLUDE_DIRS - include directories for Vulkan | ||
# Vulkan_LIBRARIES - link against this library to use Vulkan | ||
# | ||
# The module will also define two cache variables:: | ||
# | ||
# Vulkan_INCLUDE_DIR - the Vulkan include directory | ||
# Vulkan_LIBRARY - the path to the Vulkan library | ||
# | ||
if(WIN32) | ||
find_path(Vulkan_INCLUDE_DIR | ||
NAMES vulkan/vulkan.h | ||
HINTS | ||
"$ENV{VULKAN_SDK}/Include" | ||
) | ||
if(CMAKE_SIZEOF_VOID_P EQUAL 8) | ||
find_library(Vulkan_LIBRARY | ||
NAMES vulkan-1 | ||
HINTS | ||
"$ENV{VULKAN_SDK}/Lib" | ||
"$ENV{VULKAN_SDK}/Bin" | ||
) | ||
elseif(CMAKE_SIZEOF_VOID_P EQUAL 4) | ||
find_library(Vulkan_LIBRARY | ||
NAMES vulkan-1 | ||
HINTS | ||
"$ENV{VULKAN_SDK}/Lib32" | ||
"$ENV{VULKAN_SDK}/Bin32" | ||
NO_SYSTEM_ENVIRONMENT_PATH | ||
) | ||
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() | ||
set(Vulkan_LIBRARIES ${Vulkan_LIBRARY}) | ||
set(Vulkan_INCLUDE_DIRS ${Vulkan_INCLUDE_DIR}) | ||
include(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args(Vulkan | ||
DEFAULT_MSG | ||
Vulkan_LIBRARY Vulkan_INCLUDE_DIR) | ||
mark_as_advanced(Vulkan_INCLUDE_DIR Vulkan_LIBRARY) | ||
if(Vulkan_FOUND AND NOT TARGET Vulkan::Vulkan) | ||
add_library(Vulkan::Vulkan UNKNOWN IMPORTED) | ||
set_target_properties(Vulkan::Vulkan PROPERTIES | ||
IMPORTED_LOCATION "${Vulkan_LIBRARIES}" | ||
INTERFACE_INCLUDE_DIRECTORIES "${Vulkan_INCLUDE_DIRS}") | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.