Adjust name of included vulkan header. (#1527)

This commit is contained in:
Andreas Süßenbach 2023-03-08 10:10:54 +01:00 committed by GitHub
parent da4ab05a14
commit 9bee68b723
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 37 additions and 34 deletions

View File

@ -321,7 +321,8 @@ ${DispatchLoaderDynamic}
#endif #endif
)"; )";
std::string str = replaceWithMap( vulkanHppTemplate, std::string str =
replaceWithMap( vulkanHppTemplate,
{ { "ArrayProxy", readSnippet( "ArrayProxy.hpp" ) }, { { "ArrayProxy", readSnippet( "ArrayProxy.hpp" ) },
{ "ArrayProxyNoTemporaries", readSnippet( "ArrayProxyNoTemporaries.hpp" ) }, { "ArrayProxyNoTemporaries", readSnippet( "ArrayProxyNoTemporaries.hpp" ) },
{ "ArrayWrapper1D", readSnippet( "ArrayWrapper1D.hpp" ) }, { "ArrayWrapper1D", readSnippet( "ArrayWrapper1D.hpp" ) },
@ -336,7 +337,9 @@ ${DispatchLoaderDynamic}
{ "Exceptions", readSnippet( "Exceptions.hpp" ) }, { "Exceptions", readSnippet( "Exceptions.hpp" ) },
{ "Flags", readSnippet( "Flags.hpp" ) }, { "Flags", readSnippet( "Flags.hpp" ) },
{ "headerVersion", m_version }, { "headerVersion", m_version },
{ "includes", replaceWithMap( readSnippet( "includes.hpp" ), { { "vulkan", m_api } } ) }, { "includes",
replaceWithMap( readSnippet( "includes.hpp" ),
{ { "vulkan_h", ( m_api == "vulkan" ) ? "vulkan.h" : "vulkan_sc_core.h" }, { "vulkan_hpp", m_api + ".hpp" } } ) },
{ "licenseHeader", m_vulkanLicenseHeader }, { "licenseHeader", m_vulkanLicenseHeader },
{ "ObjectDestroy", readSnippet( "ObjectDestroy.hpp" ) }, { "ObjectDestroy", readSnippet( "ObjectDestroy.hpp" ) },
{ "ObjectFree", readSnippet( "ObjectFree.hpp" ) }, { "ObjectFree", readSnippet( "ObjectFree.hpp" ) },

View File

@ -16,13 +16,13 @@
#elif 199711L < VULKAN_HPP_CPLUSPLUS #elif 199711L < VULKAN_HPP_CPLUSPLUS
# define VULKAN_HPP_CPP_VERSION 11 # define VULKAN_HPP_CPP_VERSION 11
#else #else
# error "${vulkan}.hpp needs at least c++ standard version 11" # error "${vulkan_hpp} needs at least c++ standard version 11"
#endif #endif
#include <algorithm> #include <algorithm>
#include <array> // ArrayWrapperND #include <array> // ArrayWrapperND
#include <string> // std::string #include <string> // std::string
#include <vulkan/${vulkan}.h> #include <vulkan/${vulkan_h}>
#if 17 <= VULKAN_HPP_CPP_VERSION #if 17 <= VULKAN_HPP_CPP_VERSION
# include <string_view> // std::string_view # include <string_view> // std::string_view
#endif #endif

View File

@ -29,7 +29,7 @@
#include <algorithm> #include <algorithm>
#include <array> // ArrayWrapperND #include <array> // ArrayWrapperND
#include <string> // std::string #include <string> // std::string
#include <vulkan/vulkansc.h> #include <vulkan/vulkan_sc_core.h>
#if 17 <= VULKAN_HPP_CPP_VERSION #if 17 <= VULKAN_HPP_CPP_VERSION
# include <string_view> // std::string_view # include <string_view> // std::string_view
#endif #endif