Bug fixes for vulkan.cppm (#1616)

* Bug fixes for C++20 module

- Removed nested `export` keyword for `vk::raii` namespace in C++ module file
- Fixed macro in `vulkan.cppm` for `vk::DynamicLoader`: changed from `VULKAN_HPP_DYNAMIC_LOADER_TOOL` to `VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL`  
- Moved VulkanHppModule declaration before generator
- Fixed `CMakeLists.txt` for `Cpp20Modules` executable target

* Use `VULKAN_HPP_CONSTEXPR_INLINE` for constants in `vulkan.hpp`

- Added VULKAN_HPP_CONSTEXPR_INLINE macro definition
- Allow external linkage for these constants in C++17 and later
This commit is contained in:
Sharadh Rajaraman
2023-07-10 14:46:50 +08:00
committed by GitHub
parent 7a4ee5eaaf
commit f4abba455e
6 changed files with 74 additions and 56 deletions

View File

@@ -2,6 +2,9 @@ cmake_minimum_required( VERSION 3.25 )
vulkan_hpp__setup_test( NAME Cpp20Modules CXX_STANDARD 20 LIBRARIES VulkanHppModule )
if( NOT ( VULKAN_HPP_SAMPLES_BUILD_ONLY_DYNAMIC AND VULKAN_HPP_SAMPLES_BUILD_WITH_LOCAL_VULKAN_HPP ) )
if( NOT VULKAN_HPP_SAMPLES_BUILD_ONLY_DYNAMIC )
target_link_libraries( Cpp20Modules PRIVATE Vulkan::Vulkan )
set_target_properties( Cpp20Modules PROPERTIES
CXX_EXTENSIONS OFF
)
endif()