vulkan: Include a copy of vulkan.h and vk_platform.h.

Now we can provide Vulkan support in the build even if the build box doesn't
have a Vulkan SDK, since we dynamically link to the library anyhow.

--HG--
extra : rebase_source : f4972489a15b276f65ea65c077172fdcbbe3420a
This commit is contained in:
Ryan C. Gordon 2017-08-27 23:25:12 -04:00
parent 3db6496688
commit f4b87c2bcb
9 changed files with 6589 additions and 88 deletions

View file

@ -1153,25 +1153,6 @@ macro(CheckRPI)
endif(VIDEO_RPI)
endmacro(CheckRPI)
macro(CheckVulkanHeaders)
if(VIDEO_VULKAN)
# ${VULKAN_SDK} could be unset during the first configure run with
# cmake-gui resulting in vulkan.h not being found. If it's been
# subsequently changed, unset is necessary to ensure check is run again.
unset(HAVE_VULKAN_H CACHE)
# Prefer ${VULKAN_SDK} header
set(CMAKE_REQUIRED_INCLUDES "${VULKAN_SDK}/include")
check_include_file("vulkan/vulkan.h" HAVE_VULKAN_H)
if(HAVE_VULKAN_H)
list(APPEND EXTRA_CFLAGS "-I${VULKAN_SDK}/include")
else()
# Check system includes.
unset(HAVE_VULKAN_H CACHE)
check_include_file("vulkan/vulkan.h" HAVE_VULKAN_H)
endif()
endif()
endmacro(CheckVulkanHeaders)
# Requires:
# - EGL
# - PkgCheckModules