mirror of
https://github.com/KhronosGroup/Vulkan-Hpp.git
synced 2024-10-14 16:32:17 +00:00
Allow setting vulkan paths. (#419)
This CL adds VULKAN_HPP_VULKAN_HEADERS_SRC_DIR and VULKAN_HPP_PATH variables to the CMakeLists file.
This commit is contained in:
parent
d8513f1b7f
commit
fe0c9e1c14
@ -36,13 +36,21 @@ else(MSVC)
|
|||||||
add_compile_options(-Wall)
|
add_compile_options(-Wall)
|
||||||
endif(MSVC)
|
endif(MSVC)
|
||||||
|
|
||||||
file(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/Vulkan-Headers/registry/vk.xml vk_spec)
|
if (NOT DEFINED VULKAN_HPP_VULKAN_HEADERS_SRC_DIR)
|
||||||
|
set(VULKAN_HPP_VULKAN_HEADERS_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Vulkan-Headers")
|
||||||
|
endif()
|
||||||
|
file(TO_NATIVE_PATH ${VULKAN_HPP_VULKAN_HEADERS_SRC_DIR}/registry/vk.xml vk_spec)
|
||||||
string(REPLACE "\\" "\\\\" vk_spec ${vk_spec})
|
string(REPLACE "\\" "\\\\" vk_spec ${vk_spec})
|
||||||
add_definitions(-DVK_SPEC="${vk_spec}")
|
add_definitions(-DVK_SPEC="${vk_spec}")
|
||||||
|
|
||||||
file(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/vulkan/vulkan.hpp vulkan_hpp)
|
if (NOT DEFINED VULKAN_HPP_PATH)
|
||||||
|
set(VULKAN_HPP_PATH "${CMAKE_CURRENT_SOURCE_DIR}/vulkan")
|
||||||
|
endif()
|
||||||
|
file(TO_NATIVE_PATH ${VULKAN_HPP_PATH}/vulkan.hpp vulkan_hpp)
|
||||||
string(REPLACE "\\" "\\\\" vulkan_hpp ${vulkan_hpp})
|
string(REPLACE "\\" "\\\\" vulkan_hpp ${vulkan_hpp})
|
||||||
add_definitions(-DVULKAN_HPP_FILE="${vulkan_hpp}")
|
add_definitions(-DVULKAN_HPP_FILE="${vulkan_hpp}")
|
||||||
|
include_directories(${VULKAN_HPP_PATH})
|
||||||
|
|
||||||
|
|
||||||
set(HEADERS
|
set(HEADERS
|
||||||
VulkanHppGenerator.hpp
|
VulkanHppGenerator.hpp
|
||||||
|
Loading…
Reference in New Issue
Block a user