From 5480d192f57bd57932ea9691804b5938a2c541d4 Mon Sep 17 00:00:00 2001 From: asuessenbach Date: Wed, 10 Aug 2022 11:19:06 +0200 Subject: [PATCH] Refactor the CMakeLists for all the samples; use vulkan.hpp/vulkan_raii.hpp as precompiled header. --- .github/workflows/ci-windows.yml | 1 + CMakeLists.txt | 95 +++++++++++++++++++ .../01_InitInstance/01_InitInstance.cpp | 3 +- RAII_Samples/01_InitInstance/CMakeLists.txt | 24 +---- .../02_EnumerateDevices/CMakeLists.txt | 20 +--- RAII_Samples/03_InitDevice/CMakeLists.txt | 20 +--- .../04_InitCommandBuffer/CMakeLists.txt | 20 +--- RAII_Samples/05_InitSwapchain/CMakeLists.txt | 20 +--- .../06_InitDepthBuffer/CMakeLists.txt | 20 +--- .../07_InitUniformBuffer/CMakeLists.txt | 20 +--- .../08_InitPipelineLayout/CMakeLists.txt | 20 +--- .../09_InitDescriptorSet/CMakeLists.txt | 20 +--- RAII_Samples/10_InitRenderPass/CMakeLists.txt | 20 +--- RAII_Samples/11_InitShaders/CMakeLists.txt | 20 +--- .../12_InitFrameBuffers/CMakeLists.txt | 20 +--- .../13_InitVertexBuffer/CMakeLists.txt | 20 +--- RAII_Samples/14_InitPipeline/CMakeLists.txt | 20 +--- RAII_Samples/15_DrawCube/CMakeLists.txt | 20 +--- RAII_Samples/16_Vulkan_1_1/CMakeLists.txt | 20 +--- RAII_Samples/CopyBlitImage/CMakeLists.txt | 20 +--- .../CreateDebugUtilsMessenger/CMakeLists.txt | 20 +--- .../DebugUtilsObjectName/CMakeLists.txt | 20 +--- RAII_Samples/DrawTexturedCube/CMakeLists.txt | 20 +--- .../DrawTexturedCube/DrawTexturedCube.cpp | 1 - RAII_Samples/DynamicUniform/CMakeLists.txt | 20 +--- .../DynamicUniform/DynamicUniform.cpp | 1 - .../CMakeLists.txt | 20 +--- .../EnableValidationWithCallback.cpp | 1 - .../EnumerateDevicesAdvanced/CMakeLists.txt | 20 +--- .../EnumerateDevicesAdvanced.cpp | 1 - RAII_Samples/Events/CMakeLists.txt | 20 +--- RAII_Samples/Events/Events.cpp | 1 - RAII_Samples/ImmutableSampler/CMakeLists.txt | 20 +--- .../ImmutableSampler/ImmutableSampler.cpp | 1 - RAII_Samples/InitTexture/CMakeLists.txt | 20 +--- RAII_Samples/InitTexture/InitTexture.cpp | 1 - RAII_Samples/InputAttachment/CMakeLists.txt | 20 +--- .../InputAttachment/InputAttachment.cpp | 1 - .../CMakeLists.txt | 20 +--- .../CMakeLists.txt | 20 +--- .../InstanceLayerProperties/CMakeLists.txt | 20 +--- RAII_Samples/InstanceVersion/CMakeLists.txt | 20 +--- RAII_Samples/MultipleSets/CMakeLists.txt | 20 +--- RAII_Samples/MultipleSets/MultipleSets.cpp | 1 - RAII_Samples/OcclusionQuery/CMakeLists.txt | 20 +--- .../OcclusionQuery/OcclusionQuery.cpp | 1 - .../PhysicalDeviceExtensions/CMakeLists.txt | 20 +--- .../PhysicalDeviceExtensions.cpp | 1 - .../PhysicalDeviceFeatures/CMakeLists.txt | 20 +--- .../PhysicalDeviceFeatures.cpp | 1 - .../PhysicalDeviceGroups/CMakeLists.txt | 20 +--- .../PhysicalDeviceGroups.cpp | 1 - .../CMakeLists.txt | 20 +--- .../PhysicalDeviceMemoryProperties.cpp | 1 - .../PhysicalDeviceProperties/CMakeLists.txt | 20 +--- .../PhysicalDeviceProperties.cpp | 1 - .../CMakeLists.txt | 20 +--- .../PhysicalDeviceQueueFamilyProperties.cpp | 1 - RAII_Samples/PipelineCache/CMakeLists.txt | 20 +--- RAII_Samples/PipelineCache/PipelineCache.cpp | 1 - .../PipelineDerivative/CMakeLists.txt | 20 +--- .../PipelineDerivative/PipelineDerivative.cpp | 1 - RAII_Samples/PushConstants/CMakeLists.txt | 20 +--- RAII_Samples/PushConstants/PushConstants.cpp | 1 - RAII_Samples/PushDescriptors/CMakeLists.txt | 20 +--- .../PushDescriptors/PushDescriptors.cpp | 1 - RAII_Samples/RayTracing/CMakeLists.txt | 39 +++----- RAII_Samples/RayTracing/RayTracing.cpp | 24 ++++- .../SecondaryCommandBuffer/CMakeLists.txt | 20 +--- .../SecondaryCommandBuffer.cpp | 1 - .../SeparateImageSampler/CMakeLists.txt | 20 +--- .../SeparateImageSampler.cpp | 1 - .../SurfaceCapabilities/CMakeLists.txt | 19 +--- .../SurfaceCapabilities.cpp | 1 - RAII_Samples/SurfaceFormats/CMakeLists.txt | 20 +--- .../SurfaceFormats/SurfaceFormats.cpp | 1 - RAII_Samples/Template/CMakeLists.txt | 20 +--- RAII_Samples/Template/Template.cpp | 1 - RAII_Samples/TexelBuffer/CMakeLists.txt | 20 +--- RAII_Samples/TexelBuffer/TexelBuffer.cpp | 1 - RAII_Samples/utils/utils.hpp | 2 +- VulkanHppGenerator.cpp | 1 + samples/01_InitInstance/01_InitInstance.cpp | 3 +- samples/01_InitInstance/CMakeLists.txt | 24 +---- .../02_EnumerateDevices.cpp | 1 - samples/02_EnumerateDevices/CMakeLists.txt | 20 +--- samples/03_InitDevice/03_InitDevice.cpp | 1 - samples/03_InitDevice/CMakeLists.txt | 20 +--- .../04_InitCommandBuffer.cpp | 1 - samples/04_InitCommandBuffer/CMakeLists.txt | 20 +--- samples/05_InitSwapchain/05_InitSwapchain.cpp | 9 +- samples/05_InitSwapchain/CMakeLists.txt | 20 +--- .../06_InitDepthBuffer/06_InitDepthBuffer.cpp | 1 - samples/06_InitDepthBuffer/CMakeLists.txt | 20 +--- .../07_InitUniformBuffer.cpp | 1 - samples/07_InitUniformBuffer/CMakeLists.txt | 20 +--- .../08_InitPipelineLayout.cpp | 1 - samples/08_InitPipelineLayout/CMakeLists.txt | 20 +--- .../09_InitDescriptorSet.cpp | 1 - samples/09_InitDescriptorSet/CMakeLists.txt | 20 +--- .../10_InitRenderPass/10_InitRenderPass.cpp | 1 - samples/10_InitRenderPass/CMakeLists.txt | 20 +--- samples/11_InitShaders/11_InitShaders.cpp | 1 - samples/11_InitShaders/CMakeLists.txt | 20 +--- .../12_InitFrameBuffers.cpp | 1 - samples/12_InitFrameBuffers/CMakeLists.txt | 20 +--- .../13_InitVertexBuffer.cpp | 1 - samples/13_InitVertexBuffer/CMakeLists.txt | 20 +--- samples/14_InitPipeline/14_InitPipeline.cpp | 1 - samples/14_InitPipeline/CMakeLists.txt | 20 +--- samples/15_DrawCube/15_DrawCube.cpp | 1 - samples/15_DrawCube/CMakeLists.txt | 20 +--- samples/16_Vulkan_1_1/16_Vulkan_1_1.cpp | 1 - samples/16_Vulkan_1_1/CMakeLists.txt | 20 +--- samples/CopyBlitImage/CMakeLists.txt | 20 +--- samples/CopyBlitImage/CopyBlitImage.cpp | 1 - .../CreateDebugUtilsMessenger/CMakeLists.txt | 24 +---- samples/DebugUtilsObjectName/CMakeLists.txt | 20 +--- .../DebugUtilsObjectName.cpp | 1 - samples/DrawTexturedCube/CMakeLists.txt | 20 +--- samples/DrawTexturedCube/DrawTexturedCube.cpp | 1 - samples/DynamicUniform/CMakeLists.txt | 20 +--- samples/DynamicUniform/DynamicUniform.cpp | 2 - .../CMakeLists.txt | 20 +--- .../EnableValidationWithCallback.cpp | 1 - .../EnumerateDevicesAdvanced/CMakeLists.txt | 20 +--- .../EnumerateDevicesAdvanced.cpp | 1 - samples/Events/CMakeLists.txt | 20 +--- samples/Events/Events.cpp | 1 - samples/ImmutableSampler/CMakeLists.txt | 20 +--- samples/ImmutableSampler/ImmutableSampler.cpp | 1 - samples/InitTexture/CMakeLists.txt | 20 +--- samples/InitTexture/InitTexture.cpp | 1 - samples/InputAttachment/CMakeLists.txt | 20 +--- samples/InputAttachment/InputAttachment.cpp | 1 - .../CMakeLists.txt | 24 +---- .../InstanceExtensionProperties.cpp | 3 +- .../CMakeLists.txt | 24 +---- .../InstanceLayerExtensionProperties.cpp | 6 +- .../InstanceLayerProperties/CMakeLists.txt | 24 +---- .../InstanceLayerProperties.cpp | 3 +- samples/InstanceVersion/CMakeLists.txt | 24 +---- samples/InstanceVersion/InstanceVersion.cpp | 3 +- samples/MultipleSets/CMakeLists.txt | 20 +--- samples/MultipleSets/MultipleSets.cpp | 1 - samples/OcclusionQuery/CMakeLists.txt | 20 +--- samples/OcclusionQuery/OcclusionQuery.cpp | 1 - .../PhysicalDeviceExtensions/CMakeLists.txt | 20 +--- .../PhysicalDeviceExtensions.cpp | 1 - samples/PhysicalDeviceFeatures/CMakeLists.txt | 20 +--- .../PhysicalDeviceFeatures.cpp | 1 - samples/PhysicalDeviceGroups/CMakeLists.txt | 20 +--- .../PhysicalDeviceGroups.cpp | 1 - .../CMakeLists.txt | 20 +--- .../PhysicalDeviceMemoryProperties.cpp | 1 - .../PhysicalDeviceProperties/CMakeLists.txt | 20 +--- .../PhysicalDeviceProperties.cpp | 1 - .../CMakeLists.txt | 20 +--- .../PhysicalDeviceQueueFamilyProperties.cpp | 1 - samples/PipelineCache/CMakeLists.txt | 20 +--- samples/PipelineCache/PipelineCache.cpp | 2 +- samples/PipelineDerivative/CMakeLists.txt | 20 +--- .../PipelineDerivative/PipelineDerivative.cpp | 1 - samples/PushConstants/CMakeLists.txt | 20 +--- samples/PushConstants/PushConstants.cpp | 2 +- samples/PushDescriptors/CMakeLists.txt | 20 +--- samples/PushDescriptors/PushDescriptors.cpp | 1 - samples/RayTracing/CMakeLists.txt | 39 +++----- samples/RayTracing/RayTracing.cpp | 24 ++++- samples/SecondaryCommandBuffer/CMakeLists.txt | 20 +--- .../SecondaryCommandBuffer.cpp | 1 - samples/SeparateImageSampler/CMakeLists.txt | 20 +--- .../SeparateImageSampler.cpp | 1 - samples/SurfaceCapabilities/CMakeLists.txt | 19 +--- .../SurfaceCapabilities.cpp | 1 - samples/SurfaceFormats/CMakeLists.txt | 20 +--- samples/SurfaceFormats/SurfaceFormats.cpp | 1 - samples/Template/CMakeLists.txt | 20 +--- samples/Template/Template.cpp | 1 - samples/TexelBuffer/CMakeLists.txt | 20 +--- samples/TexelBuffer/TexelBuffer.cpp | 1 - samples/utils/CMakeLists.txt | 1 + samples/utils/shaders.cpp | 3 +- samples/utils/shaders.hpp | 3 +- samples/utils/utils.hpp | 4 +- tests/ArrayProxy/ArrayProxy.cpp | 3 +- .../ArrayProxyNoTemporaries.cpp | 5 +- .../DesignatedInitializers.cpp | 3 +- tests/DeviceFunctions/CMakeLists.txt | 2 +- tests/DeviceFunctions/DeviceFunctions.cpp | 3 +- .../DispatchLoaderDynamic.cpp | 4 +- .../DispatchLoaderDynamicSharedLibrary.cpp | 2 +- ...spatchLoaderDynamicSharedLibraryClient.cpp | 4 +- tests/DispatchLoaderStatic/CMakeLists.txt | 2 +- .../DispatchLoaderStatic.cpp | 3 +- tests/NoExceptions/NoExceptions.cpp | 3 +- tests/StructureChain/StructureChain.cpp | 6 +- tests/UniqueHandle/UniqueHandle.cpp | 1 - .../UniqueHandleDefaultArguments.cpp | 2 +- vulkan/vulkan_raii.hpp | 1 + 200 files changed, 299 insertions(+), 2068 deletions(-) diff --git a/.github/workflows/ci-windows.yml b/.github/workflows/ci-windows.yml index 7997d6f..9e05b03 100644 --- a/.github/workflows/ci-windows.yml +++ b/.github/workflows/ci-windows.yml @@ -39,6 +39,7 @@ jobs: -DTESTS_BUILD=ON -DTESTS_BUILD_ONLY_DYNAMIC=ON -DTESTS_BUILD_WITH_LOCAL_VULKAN_HPP=ON + -DVULKAN_HPP_PRECOMPILE=OFF -DVULKAN_HPP_RUN_GENERATOR=ON -DCMAKE_CXX_STANDARD=${{matrix.cxx_standard}} -DCMAKE_BUILD_TYPE=${{matrix.build_type}} diff --git a/CMakeLists.txt b/CMakeLists.txt index dc69a9b..be6adca 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -149,6 +149,101 @@ if (VULKAN_HPP_RUN_GENERATOR) DEPENDS "${vulkan_hpp}" "${vk_spec}") endif() +option (VULKAN_HPP_PRECOMPILE "Precompile vulkan.hpp and vulkan_raii.hpp for sample builds" ON) + +function(vulkan_hpp__setup_sample) + set(options) + set(oneValueArgs FOLDER NAME) + set(multiValueArgs HEADERS INCLUDE_DIRS LIBS PCH SOURCES) + + cmake_parse_arguments(TARGET "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + + if(${TARGET_NAME} STREQUAL "") + message(FATAL_ERROR "NAME must be defined in vulkan_hpp__setup_sample") + endif() + + project(${TARGET_NAME}) + + add_executable(${TARGET_NAME} ${TARGET_HEADERS} ${TARGET_SOURCES}) + + if (TARGET_INCLUDE_DIRS) + target_include_directories(${TARGET_NAME} PUBLIC ${TARGET_INCLUDE_DIRS}) + endif() + if (TARGET_FOLDER) + set_target_properties(${TARGET_NAME} PROPERTIES FOLDER "${TARGET_FOLDER}") + endif() + if (VULKAN_HPP_PRECOMPILE AND TARGET_PCH) + target_precompile_headers(${TARGET_NAME} PRIVATE "${TARGET_PCH}") + endif() + if (TARGET_LIBS) + target_link_libraries(${TARGET_NAME} PRIVATE "${TARGET_LIBS}") + endif() +endfunction() + +function(vulkan_hpp__setup_sample_static) + set(options) + set(oneValueArgs NAME) + set(multiValueArgs) + + cmake_parse_arguments(TARGET "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + + if(NOT SAMPLES_BUILD_ONLY_DYNAMIC) + find_package(Vulkan REQUIRED) + + vulkan_hpp__setup_sample( + NAME ${TARGET_NAME} + FOLDER Samples + PCH + SOURCES ${TARGET_NAME}.cpp + LIBS ${Vulkan_LIBRARIES}) + + target_compile_definitions(01_InitInstance PUBLIC VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=0) + + endif() +endfunction() + +function(vulkan_hpp__setup_sample_dynamic) + set(options) + set(oneValueArgs NAME) + set(multiValueArgs HEADERS INCLUDE_DIRS SOURCES) + + cmake_parse_arguments(TARGET "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + + if (NOT TARGET_SOURCES) + set(TARGET_SOURCES ${TARGET_NAME}.cpp) + endif() + + vulkan_hpp__setup_sample( + NAME ${TARGET_NAME} + FOLDER Samples + PCH + INCLUDE_DIRS ${TARGET_INCLUDE_DIRS} + HEADERS ${TARGET_HEADERS} + SOURCES ${TARGET_SOURCES} + LIBS utils) +endfunction() + +function(vulkan_hpp__setup_sample_raii) + set(options) + set(oneValueArgs NAME) + set(multiValueArgs HEADERS INCLUDE_DIRS SOURCES) + + cmake_parse_arguments(TARGET "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + + if (NOT TARGET_SOURCES) + set(TARGET_SOURCES ${TARGET_NAME}.cpp) + endif() + + vulkan_hpp__setup_sample( + NAME RAII_${TARGET_NAME} + FOLDER RAII_Samples + PCH + INCLUDE_DIRS ${TARGET_INCLUDE_DIRS} + HEADERS ${TARGET_HEADERS} + SOURCES ${TARGET_SOURCES} + LIBS utils) +endfunction() + option (SAMPLES_BUILD "Build samples" OFF) if (SAMPLES_BUILD) # external libraries diff --git a/RAII_Samples/01_InitInstance/01_InitInstance.cpp b/RAII_Samples/01_InitInstance/01_InitInstance.cpp index f8aa97a..c3dab5b 100644 --- a/RAII_Samples/01_InitInstance/01_InitInstance.cpp +++ b/RAII_Samples/01_InitInstance/01_InitInstance.cpp @@ -13,10 +13,9 @@ // limitations under the License. // // VulkanHpp Samples : 01_InitInstanceRAII -// Create and destroy a vk::UniqueInstance +// Create and destroy a vk::raii::Instance #include "../utils/utils.hpp" -#include "vulkan/vulkan_raii.hpp" #include diff --git a/RAII_Samples/01_InitInstance/CMakeLists.txt b/RAII_Samples/01_InitInstance/CMakeLists.txt index c581beb..7d6bc1a 100644 --- a/RAII_Samples/01_InitInstance/CMakeLists.txt +++ b/RAII_Samples/01_InitInstance/CMakeLists.txt @@ -14,26 +14,4 @@ cmake_minimum_required(VERSION 3.2) -if(NOT SAMPLES_BUILD_ONLY_DYNAMIC) - - project(RAII_01_InitInstance) - - set(HEADERS - ) - - set(SOURCES - 01_InitInstance.cpp - ) - - source_group(headers FILES ${HEADERS}) - source_group(sources FILES ${SOURCES}) - - add_executable(RAII_01_InitInstance - ${HEADERS} - ${SOURCES} - ) - - set_target_properties(RAII_01_InitInstance PROPERTIES FOLDER "RAII_Samples") - target_link_libraries(RAII_01_InitInstance PRIVATE utils) - -endif() +vulkan_hpp__setup_sample_raii( NAME 01_InitInstance ) diff --git a/RAII_Samples/02_EnumerateDevices/CMakeLists.txt b/RAII_Samples/02_EnumerateDevices/CMakeLists.txt index e169ccb..abffeaa 100644 --- a/RAII_Samples/02_EnumerateDevices/CMakeLists.txt +++ b/RAII_Samples/02_EnumerateDevices/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(RAII_02_EnumerateDevices) - -set(HEADERS -) - -set(SOURCES - 02_EnumerateDevices.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(RAII_02_EnumerateDevices - ${HEADERS} - ${SOURCES} -) - -set_target_properties(RAII_02_EnumerateDevices PROPERTIES FOLDER "RAII_Samples") -target_link_libraries(RAII_02_EnumerateDevices PRIVATE utils) +vulkan_hpp__setup_sample_raii( NAME 02_EnumerateDevices ) diff --git a/RAII_Samples/03_InitDevice/CMakeLists.txt b/RAII_Samples/03_InitDevice/CMakeLists.txt index e846c8f..9b93b69 100644 --- a/RAII_Samples/03_InitDevice/CMakeLists.txt +++ b/RAII_Samples/03_InitDevice/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(RAII_03_InitDevice) - -set(HEADERS -) - -set(SOURCES - 03_InitDevice.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(RAII_03_InitDevice - ${HEADERS} - ${SOURCES} -) - -set_target_properties(RAII_03_InitDevice PROPERTIES FOLDER "RAII_Samples") -target_link_libraries(RAII_03_InitDevice PRIVATE utils) +vulkan_hpp__setup_sample_raii( NAME 03_InitDevice ) diff --git a/RAII_Samples/04_InitCommandBuffer/CMakeLists.txt b/RAII_Samples/04_InitCommandBuffer/CMakeLists.txt index c10cf4e..4321220 100644 --- a/RAII_Samples/04_InitCommandBuffer/CMakeLists.txt +++ b/RAII_Samples/04_InitCommandBuffer/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(RAII_04_InitCommandBuffer) - -set(HEADERS -) - -set(SOURCES - 04_InitCommandBuffer.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(RAII_04_InitCommandBuffer - ${HEADERS} - ${SOURCES} -) - -set_target_properties(RAII_04_InitCommandBuffer PROPERTIES FOLDER "RAII_Samples") -target_link_libraries(RAII_04_InitCommandBuffer PRIVATE utils) +vulkan_hpp__setup_sample_raii( NAME 04_InitCommandBuffer ) diff --git a/RAII_Samples/05_InitSwapchain/CMakeLists.txt b/RAII_Samples/05_InitSwapchain/CMakeLists.txt index c6df6a4..fddfe69 100644 --- a/RAII_Samples/05_InitSwapchain/CMakeLists.txt +++ b/RAII_Samples/05_InitSwapchain/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(RAII_05_InitSwapchain) - -set(HEADERS -) - -set(SOURCES - 05_InitSwapchain.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(RAII_05_InitSwapchain - ${HEADERS} - ${SOURCES} -) - -set_target_properties(RAII_05_InitSwapchain PROPERTIES FOLDER "RAII_Samples") -target_link_libraries(RAII_05_InitSwapchain PRIVATE utils) +vulkan_hpp__setup_sample_raii( NAME 05_InitSwapchain ) diff --git a/RAII_Samples/06_InitDepthBuffer/CMakeLists.txt b/RAII_Samples/06_InitDepthBuffer/CMakeLists.txt index 4f10bde..f6342a5 100644 --- a/RAII_Samples/06_InitDepthBuffer/CMakeLists.txt +++ b/RAII_Samples/06_InitDepthBuffer/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(RAII_06_InitDepthBuffer) - -set(HEADERS -) - -set(SOURCES - 06_InitDepthBuffer.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(RAII_06_InitDepthBuffer - ${HEADERS} - ${SOURCES} -) - -set_target_properties(RAII_06_InitDepthBuffer PROPERTIES FOLDER "RAII_Samples") -target_link_libraries(RAII_06_InitDepthBuffer PRIVATE utils) +vulkan_hpp__setup_sample_raii( NAME 06_InitDepthBuffer ) diff --git a/RAII_Samples/07_InitUniformBuffer/CMakeLists.txt b/RAII_Samples/07_InitUniformBuffer/CMakeLists.txt index 1efa49c..b1ac0d9 100644 --- a/RAII_Samples/07_InitUniformBuffer/CMakeLists.txt +++ b/RAII_Samples/07_InitUniformBuffer/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(RAII_07_InitUniformBuffer) - -set(HEADERS -) - -set(SOURCES - 07_InitUniformBuffer.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(RAII_07_InitUniformBuffer - ${HEADERS} - ${SOURCES} -) - -set_target_properties(RAII_07_InitUniformBuffer PROPERTIES FOLDER "RAII_Samples") -target_link_libraries(RAII_07_InitUniformBuffer PRIVATE utils) +vulkan_hpp__setup_sample_raii( NAME 07_InitUniformBuffer ) diff --git a/RAII_Samples/08_InitPipelineLayout/CMakeLists.txt b/RAII_Samples/08_InitPipelineLayout/CMakeLists.txt index b67ecb8..4ceb296 100644 --- a/RAII_Samples/08_InitPipelineLayout/CMakeLists.txt +++ b/RAII_Samples/08_InitPipelineLayout/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(RAII_08_InitPipelineLayout) - -set(HEADERS -) - -set(SOURCES - 08_InitPipelineLayout.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(RAII_08_InitPipelineLayout - ${HEADERS} - ${SOURCES} -) - -set_target_properties(RAII_08_InitPipelineLayout PROPERTIES FOLDER "RAII_Samples") -target_link_libraries(RAII_08_InitPipelineLayout PRIVATE utils) +vulkan_hpp__setup_sample_raii( NAME 08_InitPipelineLayout ) diff --git a/RAII_Samples/09_InitDescriptorSet/CMakeLists.txt b/RAII_Samples/09_InitDescriptorSet/CMakeLists.txt index 788dec6..8ff0290 100644 --- a/RAII_Samples/09_InitDescriptorSet/CMakeLists.txt +++ b/RAII_Samples/09_InitDescriptorSet/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(RAII_09_InitDescriptorSet) - -set(HEADERS -) - -set(SOURCES - 09_InitDescriptorSet.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(RAII_09_InitDescriptorSet - ${HEADERS} - ${SOURCES} -) - -set_target_properties(RAII_09_InitDescriptorSet PROPERTIES FOLDER "RAII_Samples") -target_link_libraries(RAII_09_InitDescriptorSet PRIVATE utils) +vulkan_hpp__setup_sample_raii( NAME 09_InitDescriptorSet ) diff --git a/RAII_Samples/10_InitRenderPass/CMakeLists.txt b/RAII_Samples/10_InitRenderPass/CMakeLists.txt index 99a8593..e19871a 100644 --- a/RAII_Samples/10_InitRenderPass/CMakeLists.txt +++ b/RAII_Samples/10_InitRenderPass/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(RAII_10_InitRenderPass) - -set(HEADERS -) - -set(SOURCES - 10_InitRenderPass.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(RAII_10_InitRenderPass - ${HEADERS} - ${SOURCES} -) - -set_target_properties(RAII_10_InitRenderPass PROPERTIES FOLDER "RAII_Samples") -target_link_libraries(RAII_10_InitRenderPass PRIVATE utils) +vulkan_hpp__setup_sample_raii( NAME 10_InitRenderPass ) diff --git a/RAII_Samples/11_InitShaders/CMakeLists.txt b/RAII_Samples/11_InitShaders/CMakeLists.txt index e222f76..f85ccdc 100644 --- a/RAII_Samples/11_InitShaders/CMakeLists.txt +++ b/RAII_Samples/11_InitShaders/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(RAII_11_InitShaders) - -set(HEADERS -) - -set(SOURCES - 11_InitShaders.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(RAII_11_InitShaders - ${HEADERS} - ${SOURCES} -) - -set_target_properties(RAII_11_InitShaders PROPERTIES FOLDER "RAII_Samples") -target_link_libraries(RAII_11_InitShaders PRIVATE utils) +vulkan_hpp__setup_sample_raii( NAME 11_InitShaders ) diff --git a/RAII_Samples/12_InitFrameBuffers/CMakeLists.txt b/RAII_Samples/12_InitFrameBuffers/CMakeLists.txt index 713a9df..82020db 100644 --- a/RAII_Samples/12_InitFrameBuffers/CMakeLists.txt +++ b/RAII_Samples/12_InitFrameBuffers/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(RAII_12_InitFrameBuffers) - -set(HEADERS -) - -set(SOURCES - 12_InitFrameBuffers.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(RAII_12_InitFrameBuffers - ${HEADERS} - ${SOURCES} -) - -set_target_properties(RAII_12_InitFrameBuffers PROPERTIES FOLDER "RAII_Samples") -target_link_libraries(RAII_12_InitFrameBuffers PRIVATE utils) +vulkan_hpp__setup_sample_raii( NAME 12_InitFrameBuffers ) diff --git a/RAII_Samples/13_InitVertexBuffer/CMakeLists.txt b/RAII_Samples/13_InitVertexBuffer/CMakeLists.txt index d638b94..56daf70 100644 --- a/RAII_Samples/13_InitVertexBuffer/CMakeLists.txt +++ b/RAII_Samples/13_InitVertexBuffer/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(RAII_13_InitVertexBuffer) - -set(HEADERS -) - -set(SOURCES - 13_InitVertexBuffer.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(RAII_13_InitVertexBuffer - ${HEADERS} - ${SOURCES} -) - -set_target_properties(RAII_13_InitVertexBuffer PROPERTIES FOLDER "RAII_Samples") -target_link_libraries(RAII_13_InitVertexBuffer PRIVATE utils) +vulkan_hpp__setup_sample_raii( NAME 13_InitVertexBuffer ) diff --git a/RAII_Samples/14_InitPipeline/CMakeLists.txt b/RAII_Samples/14_InitPipeline/CMakeLists.txt index 1764ce6..2240e51 100644 --- a/RAII_Samples/14_InitPipeline/CMakeLists.txt +++ b/RAII_Samples/14_InitPipeline/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(RAII_14_InitPipeline) - -set(HEADERS -) - -set(SOURCES - 14_InitPipeline.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(RAII_14_InitPipeline - ${HEADERS} - ${SOURCES} -) - -set_target_properties(RAII_14_InitPipeline PROPERTIES FOLDER "RAII_Samples") -target_link_libraries(RAII_14_InitPipeline PRIVATE utils) +vulkan_hpp__setup_sample_raii( NAME 14_InitPipeline ) diff --git a/RAII_Samples/15_DrawCube/CMakeLists.txt b/RAII_Samples/15_DrawCube/CMakeLists.txt index f168e18..20b59b5 100644 --- a/RAII_Samples/15_DrawCube/CMakeLists.txt +++ b/RAII_Samples/15_DrawCube/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(RAII_15_DrawCube) - -set(HEADERS -) - -set(SOURCES - 15_DrawCube.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(RAII_15_DrawCube - ${HEADERS} - ${SOURCES} -) - -set_target_properties(RAII_15_DrawCube PROPERTIES FOLDER "RAII_Samples") -target_link_libraries(RAII_15_DrawCube PRIVATE utils) +vulkan_hpp__setup_sample_raii( NAME 15_DrawCube ) diff --git a/RAII_Samples/16_Vulkan_1_1/CMakeLists.txt b/RAII_Samples/16_Vulkan_1_1/CMakeLists.txt index 4759f44..63bd9a3 100644 --- a/RAII_Samples/16_Vulkan_1_1/CMakeLists.txt +++ b/RAII_Samples/16_Vulkan_1_1/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(RAII_16_Vulkan_1_1) - -set(HEADERS -) - -set(SOURCES - 16_Vulkan_1_1.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(RAII_16_Vulkan_1_1 - ${HEADERS} - ${SOURCES} -) - -set_target_properties(RAII_16_Vulkan_1_1 PROPERTIES FOLDER "RAII_Samples") -target_link_libraries(RAII_16_Vulkan_1_1 PRIVATE utils) +vulkan_hpp__setup_sample_raii( NAME 16_Vulkan_1_1 ) diff --git a/RAII_Samples/CopyBlitImage/CMakeLists.txt b/RAII_Samples/CopyBlitImage/CMakeLists.txt index 417f024..cf4eb07 100644 --- a/RAII_Samples/CopyBlitImage/CMakeLists.txt +++ b/RAII_Samples/CopyBlitImage/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(RAII_CopyBlitImage) - -set(HEADERS -) - -set(SOURCES - CopyBlitImage.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(RAII_CopyBlitImage - ${HEADERS} - ${SOURCES} -) - -set_target_properties(RAII_CopyBlitImage PROPERTIES FOLDER "RAII_Samples") -target_link_libraries(RAII_CopyBlitImage PRIVATE utils) +vulkan_hpp__setup_sample_raii( NAME CopyBlitImage ) diff --git a/RAII_Samples/CreateDebugUtilsMessenger/CMakeLists.txt b/RAII_Samples/CreateDebugUtilsMessenger/CMakeLists.txt index 5be9d9c..feda3da 100644 --- a/RAII_Samples/CreateDebugUtilsMessenger/CMakeLists.txt +++ b/RAII_Samples/CreateDebugUtilsMessenger/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(RAII_CreateDebugUtilsMessenger) - -set(HEADERS -) - -set(SOURCES - CreateDebugUtilsMessenger.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(RAII_CreateDebugUtilsMessenger - ${HEADERS} - ${SOURCES} -) - -set_target_properties(RAII_CreateDebugUtilsMessenger PROPERTIES FOLDER "RAII_Samples") -target_link_libraries(RAII_CreateDebugUtilsMessenger PRIVATE utils) +vulkan_hpp__setup_sample_raii( NAME CreateDebugUtilsMessenger ) diff --git a/RAII_Samples/DebugUtilsObjectName/CMakeLists.txt b/RAII_Samples/DebugUtilsObjectName/CMakeLists.txt index a4f1480..5d605fc 100644 --- a/RAII_Samples/DebugUtilsObjectName/CMakeLists.txt +++ b/RAII_Samples/DebugUtilsObjectName/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(RAII_DebugUtilsObjectName) - -set(HEADERS -) - -set(SOURCES - DebugUtilsObjectName.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(RAII_DebugUtilsObjectName - ${HEADERS} - ${SOURCES} -) - -set_target_properties(RAII_DebugUtilsObjectName PROPERTIES FOLDER "RAII_Samples") -target_link_libraries(RAII_DebugUtilsObjectName PRIVATE utils) +vulkan_hpp__setup_sample_raii( NAME DebugUtilsObjectName ) diff --git a/RAII_Samples/DrawTexturedCube/CMakeLists.txt b/RAII_Samples/DrawTexturedCube/CMakeLists.txt index 5075ab2..cd0c12b 100644 --- a/RAII_Samples/DrawTexturedCube/CMakeLists.txt +++ b/RAII_Samples/DrawTexturedCube/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(RAII_DrawTexturedCube) - -set(HEADERS -) - -set(SOURCES - DrawTexturedCube.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(RAII_DrawTexturedCube - ${HEADERS} - ${SOURCES} -) - -set_target_properties(RAII_DrawTexturedCube PROPERTIES FOLDER "RAII_Samples") -target_link_libraries(RAII_DrawTexturedCube PRIVATE utils) +vulkan_hpp__setup_sample_raii( NAME DrawTexturedCube ) diff --git a/RAII_Samples/DrawTexturedCube/DrawTexturedCube.cpp b/RAII_Samples/DrawTexturedCube/DrawTexturedCube.cpp index 787925e..62c9b7b 100644 --- a/RAII_Samples/DrawTexturedCube/DrawTexturedCube.cpp +++ b/RAII_Samples/DrawTexturedCube/DrawTexturedCube.cpp @@ -20,7 +20,6 @@ #include "../utils/shaders.hpp" #include "../utils/utils.hpp" #include "SPIRV/GlslangToSpv.h" -#include "vulkan/vulkan_raii.hpp" #include #include diff --git a/RAII_Samples/DynamicUniform/CMakeLists.txt b/RAII_Samples/DynamicUniform/CMakeLists.txt index 1a622a7..0898896 100644 --- a/RAII_Samples/DynamicUniform/CMakeLists.txt +++ b/RAII_Samples/DynamicUniform/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(RAII_DynamicUniform) - -set(HEADERS -) - -set(SOURCES - DynamicUniform.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(RAII_DynamicUniform - ${HEADERS} - ${SOURCES} -) - -set_target_properties(RAII_DynamicUniform PROPERTIES FOLDER "RAII_Samples") -target_link_libraries(RAII_DynamicUniform PRIVATE utils) +vulkan_hpp__setup_sample_raii( NAME DynamicUniform ) diff --git a/RAII_Samples/DynamicUniform/DynamicUniform.cpp b/RAII_Samples/DynamicUniform/DynamicUniform.cpp index 12d3d78..9d60d4b 100644 --- a/RAII_Samples/DynamicUniform/DynamicUniform.cpp +++ b/RAII_Samples/DynamicUniform/DynamicUniform.cpp @@ -24,7 +24,6 @@ #include "../utils/shaders.hpp" #include "../utils/utils.hpp" #include "SPIRV/GlslangToSpv.h" -#include "vulkan/vulkan_raii.hpp" #include #include diff --git a/RAII_Samples/EnableValidationWithCallback/CMakeLists.txt b/RAII_Samples/EnableValidationWithCallback/CMakeLists.txt index 0f3eb7a..ece728a 100644 --- a/RAII_Samples/EnableValidationWithCallback/CMakeLists.txt +++ b/RAII_Samples/EnableValidationWithCallback/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(RAII_EnableValidationWithCallback) - -set(HEADERS -) - -set(SOURCES - EnableValidationWithCallback.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(RAII_EnableValidationWithCallback - ${HEADERS} - ${SOURCES} -) - -set_target_properties(RAII_EnableValidationWithCallback PROPERTIES FOLDER "RAII_Samples") -target_link_libraries(RAII_EnableValidationWithCallback PRIVATE utils) +vulkan_hpp__setup_sample_raii( NAME EnableValidationWithCallback ) diff --git a/RAII_Samples/EnableValidationWithCallback/EnableValidationWithCallback.cpp b/RAII_Samples/EnableValidationWithCallback/EnableValidationWithCallback.cpp index 0e5e92c..8098fda 100644 --- a/RAII_Samples/EnableValidationWithCallback/EnableValidationWithCallback.cpp +++ b/RAII_Samples/EnableValidationWithCallback/EnableValidationWithCallback.cpp @@ -30,7 +30,6 @@ #include #include #include -#include #include static char const * AppName = "EnableValidationWithCallback"; diff --git a/RAII_Samples/EnumerateDevicesAdvanced/CMakeLists.txt b/RAII_Samples/EnumerateDevicesAdvanced/CMakeLists.txt index 1c2f7b4..2decb09 100644 --- a/RAII_Samples/EnumerateDevicesAdvanced/CMakeLists.txt +++ b/RAII_Samples/EnumerateDevicesAdvanced/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(RAII_EnumerateDevicesAdvanced) - -set(HEADERS -) - -set(SOURCES - EnumerateDevicesAdvanced.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(RAII_EnumerateDevicesAdvanced - ${HEADERS} - ${SOURCES} -) - -set_target_properties(RAII_EnumerateDevicesAdvanced PROPERTIES FOLDER "RAII_Samples") -target_link_libraries(RAII_EnumerateDevicesAdvanced PRIVATE utils) +vulkan_hpp__setup_sample_raii( NAME EnumerateDevicesAdvanced ) diff --git a/RAII_Samples/EnumerateDevicesAdvanced/EnumerateDevicesAdvanced.cpp b/RAII_Samples/EnumerateDevicesAdvanced/EnumerateDevicesAdvanced.cpp index 7170498..86679d0 100644 --- a/RAII_Samples/EnumerateDevicesAdvanced/EnumerateDevicesAdvanced.cpp +++ b/RAII_Samples/EnumerateDevicesAdvanced/EnumerateDevicesAdvanced.cpp @@ -19,7 +19,6 @@ #include #include -#include #include static char const * AppName = "EnumerateDevicesAdvanced"; diff --git a/RAII_Samples/Events/CMakeLists.txt b/RAII_Samples/Events/CMakeLists.txt index e1ba10f..c9e387e 100644 --- a/RAII_Samples/Events/CMakeLists.txt +++ b/RAII_Samples/Events/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(RAII_Events) - -set(HEADERS -) - -set(SOURCES - Events.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(RAII_Events - ${HEADERS} - ${SOURCES} -) - -set_target_properties(RAII_Events PROPERTIES FOLDER "RAII_Samples") -target_link_libraries(RAII_Events PRIVATE utils) +vulkan_hpp__setup_sample_raii( NAME Events ) diff --git a/RAII_Samples/Events/Events.cpp b/RAII_Samples/Events/Events.cpp index 3d1adb5..8676457 100644 --- a/RAII_Samples/Events/Events.cpp +++ b/RAII_Samples/Events/Events.cpp @@ -16,7 +16,6 @@ // Use basic events #include "../utils/utils.hpp" -#include "vulkan/vulkan_raii.hpp" #include diff --git a/RAII_Samples/ImmutableSampler/CMakeLists.txt b/RAII_Samples/ImmutableSampler/CMakeLists.txt index b8eee7f..5dfbdd7 100644 --- a/RAII_Samples/ImmutableSampler/CMakeLists.txt +++ b/RAII_Samples/ImmutableSampler/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(RAII_ImmutableSampler) - -set(HEADERS -) - -set(SOURCES - ImmutableSampler.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(RAII_ImmutableSampler - ${HEADERS} - ${SOURCES} -) - -set_target_properties(RAII_ImmutableSampler PROPERTIES FOLDER "RAII_Samples") -target_link_libraries(RAII_ImmutableSampler PRIVATE utils) +vulkan_hpp__setup_sample_raii( NAME ImmutableSampler ) diff --git a/RAII_Samples/ImmutableSampler/ImmutableSampler.cpp b/RAII_Samples/ImmutableSampler/ImmutableSampler.cpp index 7091a6c..8b8b723 100644 --- a/RAII_Samples/ImmutableSampler/ImmutableSampler.cpp +++ b/RAII_Samples/ImmutableSampler/ImmutableSampler.cpp @@ -32,7 +32,6 @@ #include "../utils/shaders.hpp" #include "../utils/utils.hpp" #include "SPIRV/GlslangToSpv.h" -#include "vulkan/vulkan_raii.hpp" #include #include diff --git a/RAII_Samples/InitTexture/CMakeLists.txt b/RAII_Samples/InitTexture/CMakeLists.txt index ca68361..d6423cd 100644 --- a/RAII_Samples/InitTexture/CMakeLists.txt +++ b/RAII_Samples/InitTexture/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(RAII_InitTexture) - -set(HEADERS -) - -set(SOURCES - InitTexture.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(RAII_InitTexture - ${HEADERS} - ${SOURCES} -) - -set_target_properties(RAII_InitTexture PROPERTIES FOLDER "RAII_Samples") -target_link_libraries(RAII_InitTexture PRIVATE utils) +vulkan_hpp__setup_sample_raii( NAME InitTexture ) diff --git a/RAII_Samples/InitTexture/InitTexture.cpp b/RAII_Samples/InitTexture/InitTexture.cpp index ca0e666..9a45dc4 100644 --- a/RAII_Samples/InitTexture/InitTexture.cpp +++ b/RAII_Samples/InitTexture/InitTexture.cpp @@ -30,7 +30,6 @@ #include "../utils/shaders.hpp" #include "../utils/utils.hpp" #include "SPIRV/GlslangToSpv.h" -#include "vulkan/vulkan_raii.hpp" #include diff --git a/RAII_Samples/InputAttachment/CMakeLists.txt b/RAII_Samples/InputAttachment/CMakeLists.txt index 3de3a3c..0bc35db 100644 --- a/RAII_Samples/InputAttachment/CMakeLists.txt +++ b/RAII_Samples/InputAttachment/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(RAII_InputAttachment) - -set(HEADERS -) - -set(SOURCES - InputAttachment.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(RAII_InputAttachment - ${HEADERS} - ${SOURCES} -) - -set_target_properties(RAII_InputAttachment PROPERTIES FOLDER "RAII_Samples") -target_link_libraries(RAII_InputAttachment PRIVATE utils) +vulkan_hpp__setup_sample_raii( NAME InputAttachment ) diff --git a/RAII_Samples/InputAttachment/InputAttachment.cpp b/RAII_Samples/InputAttachment/InputAttachment.cpp index 207357e..5604653 100644 --- a/RAII_Samples/InputAttachment/InputAttachment.cpp +++ b/RAII_Samples/InputAttachment/InputAttachment.cpp @@ -30,7 +30,6 @@ #include "../utils/shaders.hpp" #include "../utils/utils.hpp" #include "SPIRV/GlslangToSpv.h" -#include "vulkan/vulkan_raii.hpp" #include #include diff --git a/RAII_Samples/InstanceExtensionProperties/CMakeLists.txt b/RAII_Samples/InstanceExtensionProperties/CMakeLists.txt index d474f2f..0014091 100644 --- a/RAII_Samples/InstanceExtensionProperties/CMakeLists.txt +++ b/RAII_Samples/InstanceExtensionProperties/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(RAII_InstanceExtensionProperties) - -set(HEADERS -) - -set(SOURCES - InstanceExtensionProperties.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(RAII_InstanceExtensionProperties - ${HEADERS} - ${SOURCES} -) - -set_target_properties(RAII_InstanceExtensionProperties PROPERTIES FOLDER "RAII_Samples") -target_link_libraries(RAII_InstanceExtensionProperties PRIVATE utils) +vulkan_hpp__setup_sample_raii( NAME InstanceExtensionProperties ) diff --git a/RAII_Samples/InstanceLayerExtensionProperties/CMakeLists.txt b/RAII_Samples/InstanceLayerExtensionProperties/CMakeLists.txt index 143432d..344f1a1 100644 --- a/RAII_Samples/InstanceLayerExtensionProperties/CMakeLists.txt +++ b/RAII_Samples/InstanceLayerExtensionProperties/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(RAII_InstanceLayerExtensionProperties) - -set(HEADERS -) - -set(SOURCES - InstanceLayerExtensionProperties.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(RAII_InstanceLayerExtensionProperties - ${HEADERS} - ${SOURCES} -) - -set_target_properties(RAII_InstanceLayerExtensionProperties PROPERTIES FOLDER "RAII_Samples") -target_link_libraries(RAII_InstanceLayerExtensionProperties PRIVATE utils) +vulkan_hpp__setup_sample_raii( NAME InstanceLayerExtensionProperties ) diff --git a/RAII_Samples/InstanceLayerProperties/CMakeLists.txt b/RAII_Samples/InstanceLayerProperties/CMakeLists.txt index 30249cc..78ace27 100644 --- a/RAII_Samples/InstanceLayerProperties/CMakeLists.txt +++ b/RAII_Samples/InstanceLayerProperties/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(RAII_InstanceLayerProperties) - -set(HEADERS -) - -set(SOURCES -InstanceLayerProperties.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(RAII_InstanceLayerProperties -${HEADERS} -${SOURCES} -) - -set_target_properties(RAII_InstanceLayerProperties PROPERTIES FOLDER "RAII_Samples") -target_link_libraries(RAII_InstanceLayerProperties PRIVATE utils) +vulkan_hpp__setup_sample_raii( NAME InstanceLayerProperties ) diff --git a/RAII_Samples/InstanceVersion/CMakeLists.txt b/RAII_Samples/InstanceVersion/CMakeLists.txt index 129b56e..7f95cc6 100644 --- a/RAII_Samples/InstanceVersion/CMakeLists.txt +++ b/RAII_Samples/InstanceVersion/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(RAII_InstanceVersion) - -set(HEADERS -) - -set(SOURCES -InstanceVersion.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(RAII_InstanceVersion -${HEADERS} -${SOURCES} -) - -set_target_properties(RAII_InstanceVersion PROPERTIES FOLDER "RAII_Samples") -target_link_libraries(RAII_InstanceVersion PRIVATE utils) +vulkan_hpp__setup_sample_raii( NAME InstanceVersion ) diff --git a/RAII_Samples/MultipleSets/CMakeLists.txt b/RAII_Samples/MultipleSets/CMakeLists.txt index c1fec5d..6c728bd 100644 --- a/RAII_Samples/MultipleSets/CMakeLists.txt +++ b/RAII_Samples/MultipleSets/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(RAII_MultipleSets) - -set(HEADERS -) - -set(SOURCES - MultipleSets.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(RAII_MultipleSets - ${HEADERS} - ${SOURCES} -) - -set_target_properties(RAII_MultipleSets PROPERTIES FOLDER "RAII_Samples") -target_link_libraries(RAII_MultipleSets PRIVATE utils) +vulkan_hpp__setup_sample_raii( NAME MultipleSets ) diff --git a/RAII_Samples/MultipleSets/MultipleSets.cpp b/RAII_Samples/MultipleSets/MultipleSets.cpp index f94ff74..08a070d 100644 --- a/RAII_Samples/MultipleSets/MultipleSets.cpp +++ b/RAII_Samples/MultipleSets/MultipleSets.cpp @@ -32,7 +32,6 @@ #include "../utils/shaders.hpp" #include "../utils/utils.hpp" #include "SPIRV/GlslangToSpv.h" -#include "vulkan/vulkan_raii.hpp" #include #include diff --git a/RAII_Samples/OcclusionQuery/CMakeLists.txt b/RAII_Samples/OcclusionQuery/CMakeLists.txt index 490728f..ea80c80 100644 --- a/RAII_Samples/OcclusionQuery/CMakeLists.txt +++ b/RAII_Samples/OcclusionQuery/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(RAII_OcclusionQuery) - -set(HEADERS -) - -set(SOURCES - OcclusionQuery.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(RAII_OcclusionQuery - ${HEADERS} - ${SOURCES} -) - -set_target_properties(RAII_OcclusionQuery PROPERTIES FOLDER "RAII_Samples") -target_link_libraries(RAII_OcclusionQuery PRIVATE utils) +vulkan_hpp__setup_sample_raii( NAME OcclusionQuery ) diff --git a/RAII_Samples/OcclusionQuery/OcclusionQuery.cpp b/RAII_Samples/OcclusionQuery/OcclusionQuery.cpp index 23c2059..32c8bfa 100644 --- a/RAII_Samples/OcclusionQuery/OcclusionQuery.cpp +++ b/RAII_Samples/OcclusionQuery/OcclusionQuery.cpp @@ -20,7 +20,6 @@ #include "../utils/shaders.hpp" #include "../utils/utils.hpp" #include "SPIRV/GlslangToSpv.h" -#include "vulkan/vulkan_raii.hpp" #include #include diff --git a/RAII_Samples/PhysicalDeviceExtensions/CMakeLists.txt b/RAII_Samples/PhysicalDeviceExtensions/CMakeLists.txt index e5f6226..6a85289 100644 --- a/RAII_Samples/PhysicalDeviceExtensions/CMakeLists.txt +++ b/RAII_Samples/PhysicalDeviceExtensions/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(RAII_PhysicalDeviceExtensions) - -set(HEADERS -) - -set(SOURCES - PhysicalDeviceExtensions.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(RAII_PhysicalDeviceExtensions - ${HEADERS} - ${SOURCES} -) - -set_target_properties(RAII_PhysicalDeviceExtensions PROPERTIES FOLDER "RAII_Samples") -target_link_libraries(RAII_PhysicalDeviceExtensions PRIVATE utils) +vulkan_hpp__setup_sample_raii( NAME PhysicalDeviceExtensions ) diff --git a/RAII_Samples/PhysicalDeviceExtensions/PhysicalDeviceExtensions.cpp b/RAII_Samples/PhysicalDeviceExtensions/PhysicalDeviceExtensions.cpp index 00bb213..98b2ac0 100644 --- a/RAII_Samples/PhysicalDeviceExtensions/PhysicalDeviceExtensions.cpp +++ b/RAII_Samples/PhysicalDeviceExtensions/PhysicalDeviceExtensions.cpp @@ -16,7 +16,6 @@ // Get extension properties per physical device. #include "../utils/utils.hpp" -#include "vulkan/vulkan.hpp" #include diff --git a/RAII_Samples/PhysicalDeviceFeatures/CMakeLists.txt b/RAII_Samples/PhysicalDeviceFeatures/CMakeLists.txt index 71c047a..51ca099 100644 --- a/RAII_Samples/PhysicalDeviceFeatures/CMakeLists.txt +++ b/RAII_Samples/PhysicalDeviceFeatures/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(RAII_PhysicalDeviceFeatures) - -set(HEADERS -) - -set(SOURCES - PhysicalDeviceFeatures.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(RAII_PhysicalDeviceFeatures - ${HEADERS} - ${SOURCES} -) - -set_target_properties(RAII_PhysicalDeviceFeatures PROPERTIES FOLDER "RAII_Samples") -target_link_libraries(RAII_PhysicalDeviceFeatures PRIVATE utils) +vulkan_hpp__setup_sample_raii( NAME PhysicalDeviceFeatures ) diff --git a/RAII_Samples/PhysicalDeviceFeatures/PhysicalDeviceFeatures.cpp b/RAII_Samples/PhysicalDeviceFeatures/PhysicalDeviceFeatures.cpp index f15b002..af3dc73 100644 --- a/RAII_Samples/PhysicalDeviceFeatures/PhysicalDeviceFeatures.cpp +++ b/RAII_Samples/PhysicalDeviceFeatures/PhysicalDeviceFeatures.cpp @@ -25,7 +25,6 @@ #endif #include "../utils/utils.hpp" -#include "vulkan/vulkan.hpp" #include diff --git a/RAII_Samples/PhysicalDeviceGroups/CMakeLists.txt b/RAII_Samples/PhysicalDeviceGroups/CMakeLists.txt index 0528539..fcccbd8 100644 --- a/RAII_Samples/PhysicalDeviceGroups/CMakeLists.txt +++ b/RAII_Samples/PhysicalDeviceGroups/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(RAII_PhysicalDeviceGroups) - -set(HEADERS -) - -set(SOURCES - PhysicalDeviceGroups.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(RAII_PhysicalDeviceGroups - ${HEADERS} - ${SOURCES} -) - -set_target_properties(RAII_PhysicalDeviceGroups PROPERTIES FOLDER "RAII_Samples") -target_link_libraries(RAII_PhysicalDeviceGroups PRIVATE utils) +vulkan_hpp__setup_sample_raii( NAME PhysicalDeviceGroups ) diff --git a/RAII_Samples/PhysicalDeviceGroups/PhysicalDeviceGroups.cpp b/RAII_Samples/PhysicalDeviceGroups/PhysicalDeviceGroups.cpp index 1f28a29..f56e0e3 100644 --- a/RAII_Samples/PhysicalDeviceGroups/PhysicalDeviceGroups.cpp +++ b/RAII_Samples/PhysicalDeviceGroups/PhysicalDeviceGroups.cpp @@ -16,7 +16,6 @@ // Get the PhysicalDeviceGroups. #include "../utils/utils.hpp" -#include "vulkan/vulkan.hpp" #include diff --git a/RAII_Samples/PhysicalDeviceMemoryProperties/CMakeLists.txt b/RAII_Samples/PhysicalDeviceMemoryProperties/CMakeLists.txt index c81c5de..826a6de 100644 --- a/RAII_Samples/PhysicalDeviceMemoryProperties/CMakeLists.txt +++ b/RAII_Samples/PhysicalDeviceMemoryProperties/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(RAII_PhysicalDeviceMemoryProperties) - -set(HEADERS -) - -set(SOURCES - PhysicalDeviceMemoryProperties.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(RAII_PhysicalDeviceMemoryProperties - ${HEADERS} - ${SOURCES} -) - -set_target_properties(RAII_PhysicalDeviceMemoryProperties PROPERTIES FOLDER "RAII_Samples") -target_link_libraries(RAII_PhysicalDeviceMemoryProperties PRIVATE utils) +vulkan_hpp__setup_sample_raii( NAME PhysicalDeviceMemoryProperties ) diff --git a/RAII_Samples/PhysicalDeviceMemoryProperties/PhysicalDeviceMemoryProperties.cpp b/RAII_Samples/PhysicalDeviceMemoryProperties/PhysicalDeviceMemoryProperties.cpp index f0c74df..3b919ac 100644 --- a/RAII_Samples/PhysicalDeviceMemoryProperties/PhysicalDeviceMemoryProperties.cpp +++ b/RAII_Samples/PhysicalDeviceMemoryProperties/PhysicalDeviceMemoryProperties.cpp @@ -19,7 +19,6 @@ #include #include -#include #include static char const * AppName = "PhysicalDeviceMemoryProperties"; diff --git a/RAII_Samples/PhysicalDeviceProperties/CMakeLists.txt b/RAII_Samples/PhysicalDeviceProperties/CMakeLists.txt index 670d047..ac37a40 100644 --- a/RAII_Samples/PhysicalDeviceProperties/CMakeLists.txt +++ b/RAII_Samples/PhysicalDeviceProperties/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(RAII_PhysicalDeviceProperties) - -set(HEADERS -) - -set(SOURCES - PhysicalDeviceProperties.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(RAII_PhysicalDeviceProperties - ${HEADERS} - ${SOURCES} -) - -set_target_properties(RAII_PhysicalDeviceProperties PROPERTIES FOLDER "RAII_Samples") -target_link_libraries(RAII_PhysicalDeviceProperties PRIVATE utils) +vulkan_hpp__setup_sample_raii( NAME PhysicalDeviceProperties ) diff --git a/RAII_Samples/PhysicalDeviceProperties/PhysicalDeviceProperties.cpp b/RAII_Samples/PhysicalDeviceProperties/PhysicalDeviceProperties.cpp index f86cc65..c72c6e6 100644 --- a/RAII_Samples/PhysicalDeviceProperties/PhysicalDeviceProperties.cpp +++ b/RAII_Samples/PhysicalDeviceProperties/PhysicalDeviceProperties.cpp @@ -20,7 +20,6 @@ #include #include #include -#include #include static char const * AppName = "PhysicalDeviceProperties"; diff --git a/RAII_Samples/PhysicalDeviceQueueFamilyProperties/CMakeLists.txt b/RAII_Samples/PhysicalDeviceQueueFamilyProperties/CMakeLists.txt index d1a7e57..1c524fd 100644 --- a/RAII_Samples/PhysicalDeviceQueueFamilyProperties/CMakeLists.txt +++ b/RAII_Samples/PhysicalDeviceQueueFamilyProperties/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(RAII_PhysicalDeviceQueueFamilyProperties) - -set(HEADERS -) - -set(SOURCES - PhysicalDeviceQueueFamilyProperties.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(RAII_PhysicalDeviceQueueFamilyProperties - ${HEADERS} - ${SOURCES} -) - -set_target_properties(RAII_PhysicalDeviceQueueFamilyProperties PROPERTIES FOLDER "RAII_Samples") -target_link_libraries(RAII_PhysicalDeviceQueueFamilyProperties PRIVATE utils) +vulkan_hpp__setup_sample_raii( NAME PhysicalDeviceQueueFamilyProperties ) diff --git a/RAII_Samples/PhysicalDeviceQueueFamilyProperties/PhysicalDeviceQueueFamilyProperties.cpp b/RAII_Samples/PhysicalDeviceQueueFamilyProperties/PhysicalDeviceQueueFamilyProperties.cpp index ab87718..2ce4d7e 100644 --- a/RAII_Samples/PhysicalDeviceQueueFamilyProperties/PhysicalDeviceQueueFamilyProperties.cpp +++ b/RAII_Samples/PhysicalDeviceQueueFamilyProperties/PhysicalDeviceQueueFamilyProperties.cpp @@ -20,7 +20,6 @@ #include #include #include -#include #include static char const * AppName = "PhysicalDeviceQueueFamilyProperties"; diff --git a/RAII_Samples/PipelineCache/CMakeLists.txt b/RAII_Samples/PipelineCache/CMakeLists.txt index c86d37f..1ff0753 100644 --- a/RAII_Samples/PipelineCache/CMakeLists.txt +++ b/RAII_Samples/PipelineCache/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(RAII_PipelineCache) - -set(HEADERS -) - -set(SOURCES - PipelineCache.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(RAII_PipelineCache - ${HEADERS} - ${SOURCES} -) - -set_target_properties(RAII_PipelineCache PROPERTIES FOLDER "RAII_Samples") -target_link_libraries(RAII_PipelineCache PRIVATE utils) +vulkan_hpp__setup_sample_raii( NAME PipelineCache ) diff --git a/RAII_Samples/PipelineCache/PipelineCache.cpp b/RAII_Samples/PipelineCache/PipelineCache.cpp index a2807f3..2e85a37 100644 --- a/RAII_Samples/PipelineCache/PipelineCache.cpp +++ b/RAII_Samples/PipelineCache/PipelineCache.cpp @@ -29,7 +29,6 @@ #include "../utils/shaders.hpp" #include "../utils/utils.hpp" #include "SPIRV/GlslangToSpv.h" -#include "vulkan/vulkan.hpp" #include #include diff --git a/RAII_Samples/PipelineDerivative/CMakeLists.txt b/RAII_Samples/PipelineDerivative/CMakeLists.txt index 0a8df17..018bfce 100644 --- a/RAII_Samples/PipelineDerivative/CMakeLists.txt +++ b/RAII_Samples/PipelineDerivative/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(RAII_PipelineDerivative) - -set(HEADERS -) - -set(SOURCES - PipelineDerivative.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(RAII_PipelineDerivative - ${HEADERS} - ${SOURCES} -) - -set_target_properties(RAII_PipelineDerivative PROPERTIES FOLDER "RAII_Samples") -target_link_libraries(RAII_PipelineDerivative PRIVATE utils) +vulkan_hpp__setup_sample_raii( NAME PipelineDerivative ) diff --git a/RAII_Samples/PipelineDerivative/PipelineDerivative.cpp b/RAII_Samples/PipelineDerivative/PipelineDerivative.cpp index de2c39d..fdcc7cf 100644 --- a/RAII_Samples/PipelineDerivative/PipelineDerivative.cpp +++ b/RAII_Samples/PipelineDerivative/PipelineDerivative.cpp @@ -29,7 +29,6 @@ #include "../utils/shaders.hpp" #include "../utils/utils.hpp" #include "SPIRV/GlslangToSpv.h" -#include "vulkan/vulkan.hpp" #include diff --git a/RAII_Samples/PushConstants/CMakeLists.txt b/RAII_Samples/PushConstants/CMakeLists.txt index a6bebf4..e1a00ad 100644 --- a/RAII_Samples/PushConstants/CMakeLists.txt +++ b/RAII_Samples/PushConstants/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(RAII_PushConstants) - -set(HEADERS -) - -set(SOURCES - PushConstants.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(RAII_PushConstants - ${HEADERS} - ${SOURCES} -) - -set_target_properties(RAII_PushConstants PROPERTIES FOLDER "RAII_Samples") -target_link_libraries(RAII_PushConstants PRIVATE utils) +vulkan_hpp__setup_sample_raii( NAME PushConstants ) diff --git a/RAII_Samples/PushConstants/PushConstants.cpp b/RAII_Samples/PushConstants/PushConstants.cpp index ee316b1..5ab43f5 100644 --- a/RAII_Samples/PushConstants/PushConstants.cpp +++ b/RAII_Samples/PushConstants/PushConstants.cpp @@ -29,7 +29,6 @@ #include "../utils/shaders.hpp" #include "../utils/utils.hpp" #include "SPIRV/GlslangToSpv.h" -#include "vulkan/vulkan.hpp" #include #include diff --git a/RAII_Samples/PushDescriptors/CMakeLists.txt b/RAII_Samples/PushDescriptors/CMakeLists.txt index 6178ad1..5decd6b 100644 --- a/RAII_Samples/PushDescriptors/CMakeLists.txt +++ b/RAII_Samples/PushDescriptors/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(RAII_PushDescriptors) - -set(HEADERS -) - -set(SOURCES - PushDescriptors.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(RAII_PushDescriptors - ${HEADERS} - ${SOURCES} -) - -set_target_properties(RAII_PushDescriptors PROPERTIES FOLDER "RAII_Samples") -target_link_libraries(RAII_PushDescriptors PRIVATE utils) +vulkan_hpp__setup_sample_raii( NAME PushDescriptors ) diff --git a/RAII_Samples/PushDescriptors/PushDescriptors.cpp b/RAII_Samples/PushDescriptors/PushDescriptors.cpp index b1af230..2974ac6 100644 --- a/RAII_Samples/PushDescriptors/PushDescriptors.cpp +++ b/RAII_Samples/PushDescriptors/PushDescriptors.cpp @@ -21,7 +21,6 @@ #include "../utils/shaders.hpp" #include "../utils/utils.hpp" #include "SPIRV/GlslangToSpv.h" -#include "vulkan/vulkan.hpp" #include #include diff --git a/RAII_Samples/RayTracing/CMakeLists.txt b/RAII_Samples/RayTracing/CMakeLists.txt index e06bd58..6dddb99 100644 --- a/RAII_Samples/RayTracing/CMakeLists.txt +++ b/RAII_Samples/RayTracing/CMakeLists.txt @@ -14,30 +14,15 @@ cmake_minimum_required(VERSION 3.2) -project(RAII_RayTracing) - -set(HEADERS - CameraManipulator.hpp -) - -set(SOURCES - CameraManipulator.cpp - RayTracing.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(RAII_RayTracing - ${HEADERS} - ${SOURCES} -) - -set_target_properties(RAII_RayTracing PROPERTIES FOLDER "RAII_Samples") -target_link_libraries(RAII_RayTracing PRIVATE utils) -target_include_directories(RAII_RayTracing PUBLIC - ${CMAKE_SOURCE_DIR}/samples/RayTracing/common - ${CMAKE_SOURCE_DIR}/samples/RayTracing/vulkannv - ${CMAKE_SOURCE_DIR}/stb - ${CMAKE_SOURCE_DIR}/tinyobjloader - ) +vulkan_hpp__setup_sample_raii( + NAME RayTracing + INCLUDE_DIRS + ${CMAKE_SOURCE_DIR}/samples/RayTracing/common + ${CMAKE_SOURCE_DIR}/samples/RayTracing/vulkannv + ${CMAKE_SOURCE_DIR}/stb + ${CMAKE_SOURCE_DIR}/tinyobjloader + HEADERS + CameraManipulator.hpp + SOURCES + CameraManipulator.cpp + RayTracing.cpp) diff --git a/RAII_Samples/RayTracing/RayTracing.cpp b/RAII_Samples/RayTracing/RayTracing.cpp index ab24b7f..c620d46 100644 --- a/RAII_Samples/RayTracing/RayTracing.cpp +++ b/RAII_Samples/RayTracing/RayTracing.cpp @@ -28,8 +28,6 @@ // unknow compiler... just ignore the warnings for yourselves ;) #endif -#define VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL 0 - // clang-format off // we need to include vulkan.hpp before glfw3.h, so stop clang-format to reorder them #include @@ -691,7 +689,27 @@ int main( int /*argc*/, char ** /*argv*/ ) #if !defined( NDEBUG ) vk::raii::DebugUtilsMessengerEXT debugUtilsMessenger( instance, vk::su::makeDebugUtilsMessengerCreateInfoEXT() ); #endif - vk::raii::PhysicalDevice physicalDevice = vk::raii::PhysicalDevices( instance ).front(); + + vk::raii::PhysicalDevice physicalDevice( nullptr ); + vk::raii::PhysicalDevices physicalDevices( instance ); + for ( auto & pd : physicalDevices ) + { + std::vector ep = pd.enumerateDeviceExtensionProperties(); + if ( std::find_if( ep.cbegin(), + ep.cend(), + []( vk::ExtensionProperties const & prop ) + { return strcmp( prop.extensionName, VK_NV_RAY_TRACING_EXTENSION_NAME ) == 0; } ) != + ep.cend() ) + { + physicalDevice = pd; + break; + } + } + if ( !*physicalDevice ) + { + std::cerr << AppName << ": can't find a PhysicalDevice supporting extension <" << VK_NV_RAY_TRACING_EXTENSION_NAME << ">" << std::endl; + return 1; + } std::vector extensionProperties = physicalDevice.enumerateDeviceExtensionProperties(); assert( vk::su::contains( extensionProperties, VK_KHR_SWAPCHAIN_EXTENSION_NAME ) ); diff --git a/RAII_Samples/SecondaryCommandBuffer/CMakeLists.txt b/RAII_Samples/SecondaryCommandBuffer/CMakeLists.txt index 9e38430..be17606 100644 --- a/RAII_Samples/SecondaryCommandBuffer/CMakeLists.txt +++ b/RAII_Samples/SecondaryCommandBuffer/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(RAII_SecondaryCommandBuffer) - -set(HEADERS -) - -set(SOURCES - SecondaryCommandBuffer.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(RAII_SecondaryCommandBuffer - ${HEADERS} - ${SOURCES} -) - -set_target_properties(RAII_SecondaryCommandBuffer PROPERTIES FOLDER "RAII_Samples") -target_link_libraries(RAII_SecondaryCommandBuffer PRIVATE utils) +vulkan_hpp__setup_sample_raii( NAME SecondaryCommandBuffer ) diff --git a/RAII_Samples/SecondaryCommandBuffer/SecondaryCommandBuffer.cpp b/RAII_Samples/SecondaryCommandBuffer/SecondaryCommandBuffer.cpp index 6f813d3..4adbd79 100644 --- a/RAII_Samples/SecondaryCommandBuffer/SecondaryCommandBuffer.cpp +++ b/RAII_Samples/SecondaryCommandBuffer/SecondaryCommandBuffer.cpp @@ -30,7 +30,6 @@ #include "../utils/shaders.hpp" #include "../utils/utils.hpp" #include "SPIRV/GlslangToSpv.h" -#include "vulkan/vulkan.hpp" #include #include diff --git a/RAII_Samples/SeparateImageSampler/CMakeLists.txt b/RAII_Samples/SeparateImageSampler/CMakeLists.txt index c00f669..2502d10 100644 --- a/RAII_Samples/SeparateImageSampler/CMakeLists.txt +++ b/RAII_Samples/SeparateImageSampler/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(RAII_SeparateImageSampler) - -set(HEADERS -) - -set(SOURCES - SeparateImageSampler.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(RAII_SeparateImageSampler - ${HEADERS} - ${SOURCES} -) - -set_target_properties(RAII_SeparateImageSampler PROPERTIES FOLDER "RAII_Samples") -target_link_libraries(RAII_SeparateImageSampler PRIVATE utils) +vulkan_hpp__setup_sample_raii( NAME SeparateImageSampler ) diff --git a/RAII_Samples/SeparateImageSampler/SeparateImageSampler.cpp b/RAII_Samples/SeparateImageSampler/SeparateImageSampler.cpp index a5157c8..a97c6d2 100644 --- a/RAII_Samples/SeparateImageSampler/SeparateImageSampler.cpp +++ b/RAII_Samples/SeparateImageSampler/SeparateImageSampler.cpp @@ -29,7 +29,6 @@ #include "../utils/shaders.hpp" #include "../utils/utils.hpp" #include "SPIRV/GlslangToSpv.h" -#include "vulkan/vulkan.hpp" #include #include diff --git a/RAII_Samples/SurfaceCapabilities/CMakeLists.txt b/RAII_Samples/SurfaceCapabilities/CMakeLists.txt index 33b9769..fd9c0e2 100644 --- a/RAII_Samples/SurfaceCapabilities/CMakeLists.txt +++ b/RAII_Samples/SurfaceCapabilities/CMakeLists.txt @@ -14,26 +14,9 @@ cmake_minimum_required(VERSION 3.2) -project(RAII_SurfaceCapabilities) - -set(HEADERS -) - -set(SOURCES - SurfaceCapabilities.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - # Win32 exclusive vk::SurfaceCapabilitiesFullScreenExclusiveEXT is used if(WIN32) - add_executable(RAII_SurfaceCapabilities - ${HEADERS} - ${SOURCES} - ) - set_target_properties(RAII_SurfaceCapabilities PROPERTIES FOLDER "RAII_Samples") - target_link_libraries(RAII_SurfaceCapabilities PRIVATE utils) + vulkan_hpp__setup_sample_raii( NAME SurfaceCapabilities ) endif() diff --git a/RAII_Samples/SurfaceCapabilities/SurfaceCapabilities.cpp b/RAII_Samples/SurfaceCapabilities/SurfaceCapabilities.cpp index 96f5feb..5766ae4 100644 --- a/RAII_Samples/SurfaceCapabilities/SurfaceCapabilities.cpp +++ b/RAII_Samples/SurfaceCapabilities/SurfaceCapabilities.cpp @@ -20,7 +20,6 @@ #include #include #include -#include #include static char const * AppName = "SurfaceCapabilities"; diff --git a/RAII_Samples/SurfaceFormats/CMakeLists.txt b/RAII_Samples/SurfaceFormats/CMakeLists.txt index 52ef9e6..15f74bc 100644 --- a/RAII_Samples/SurfaceFormats/CMakeLists.txt +++ b/RAII_Samples/SurfaceFormats/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(RAII_SurfaceFormats) - -set(HEADERS -) - -set(SOURCES - SurfaceFormats.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(RAII_SurfaceFormats - ${HEADERS} - ${SOURCES} -) - -set_target_properties(RAII_SurfaceFormats PROPERTIES FOLDER "RAII_Samples") -target_link_libraries(RAII_SurfaceFormats PRIVATE utils) +vulkan_hpp__setup_sample_raii( NAME SurfaceFormats ) diff --git a/RAII_Samples/SurfaceFormats/SurfaceFormats.cpp b/RAII_Samples/SurfaceFormats/SurfaceFormats.cpp index 5293207..d3e71ad 100644 --- a/RAII_Samples/SurfaceFormats/SurfaceFormats.cpp +++ b/RAII_Samples/SurfaceFormats/SurfaceFormats.cpp @@ -20,7 +20,6 @@ #include #include #include -#include #include static char const * AppName = "SurfaceFormats"; diff --git a/RAII_Samples/Template/CMakeLists.txt b/RAII_Samples/Template/CMakeLists.txt index a0f983c..77e81d6 100644 --- a/RAII_Samples/Template/CMakeLists.txt +++ b/RAII_Samples/Template/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(RAII_Template) - -set(HEADERS -) - -set(SOURCES - Template.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(RAII_Template - ${HEADERS} - ${SOURCES} -) - -set_target_properties(RAII_Template PROPERTIES FOLDER "RAII_Samples") -target_link_libraries(RAII_Template PRIVATE utils) +vulkan_hpp__setup_sample_raii( NAME Template ) diff --git a/RAII_Samples/Template/Template.cpp b/RAII_Samples/Template/Template.cpp index c609e33..bba8149 100644 --- a/RAII_Samples/Template/Template.cpp +++ b/RAII_Samples/Template/Template.cpp @@ -20,7 +20,6 @@ #include "../utils/shaders.hpp" #include "../utils/utils.hpp" #include "SPIRV/GlslangToSpv.h" -#include "vulkan/vulkan.hpp" #include #include diff --git a/RAII_Samples/TexelBuffer/CMakeLists.txt b/RAII_Samples/TexelBuffer/CMakeLists.txt index 35a421f..dd50f03 100644 --- a/RAII_Samples/TexelBuffer/CMakeLists.txt +++ b/RAII_Samples/TexelBuffer/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(RAII_TexelBuffer) - -set(HEADERS -) - -set(SOURCES - TexelBuffer.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(RAII_TexelBuffer - ${HEADERS} - ${SOURCES} -) - -set_target_properties(RAII_TexelBuffer PROPERTIES FOLDER "RAII_Samples") -target_link_libraries(RAII_TexelBuffer PRIVATE utils) +vulkan_hpp__setup_sample_raii( NAME TexelBuffer ) diff --git a/RAII_Samples/TexelBuffer/TexelBuffer.cpp b/RAII_Samples/TexelBuffer/TexelBuffer.cpp index 8471b6b..c459476 100644 --- a/RAII_Samples/TexelBuffer/TexelBuffer.cpp +++ b/RAII_Samples/TexelBuffer/TexelBuffer.cpp @@ -20,7 +20,6 @@ #include "../utils/shaders.hpp" #include "../utils/utils.hpp" #include "SPIRV/GlslangToSpv.h" -#include "vulkan/vulkan.hpp" #include #include diff --git a/RAII_Samples/utils/utils.hpp b/RAII_Samples/utils/utils.hpp index dacf083..e80d146 100644 --- a/RAII_Samples/utils/utils.hpp +++ b/RAII_Samples/utils/utils.hpp @@ -26,7 +26,7 @@ #endif #include "../../samples/utils/utils.hpp" -#include "vulkan/vulkan_raii.hpp" +#include #include diff --git a/VulkanHppGenerator.cpp b/VulkanHppGenerator.cpp index 1623933..29d4418 100644 --- a/VulkanHppGenerator.cpp +++ b/VulkanHppGenerator.cpp @@ -404,6 +404,7 @@ void VulkanHppGenerator::generateVulkanRAIIHppFile() const #ifndef VULKAN_RAII_HPP # define VULKAN_RAII_HPP +#include #include #if !defined( VULKAN_HPP_RAII_NAMESPACE ) diff --git a/samples/01_InitInstance/01_InitInstance.cpp b/samples/01_InitInstance/01_InitInstance.cpp index 0518b01..427da77 100644 --- a/samples/01_InitInstance/01_InitInstance.cpp +++ b/samples/01_InitInstance/01_InitInstance.cpp @@ -15,9 +15,8 @@ // VulkanHpp Samples : 01_InitInstance // Create and destroy a vk::Instance -#include "vulkan/vulkan.hpp" - #include +#include static std::string AppName = "01_InitInstance"; static std::string EngineName = "Vulkan.hpp"; diff --git a/samples/01_InitInstance/CMakeLists.txt b/samples/01_InitInstance/CMakeLists.txt index d8cd6b6..1736faf 100644 --- a/samples/01_InitInstance/CMakeLists.txt +++ b/samples/01_InitInstance/CMakeLists.txt @@ -14,26 +14,4 @@ cmake_minimum_required(VERSION 3.2) -if(NOT SAMPLES_BUILD_ONLY_DYNAMIC) - - project(01_InitInstance) - - set(HEADERS - ) - - set(SOURCES - 01_InitInstance.cpp - ) - - source_group(headers FILES ${HEADERS}) - source_group(sources FILES ${SOURCES}) - - add_executable(01_InitInstance - ${HEADERS} - ${SOURCES} - ) - - set_target_properties(01_InitInstance PROPERTIES FOLDER "Samples") - target_link_libraries(01_InitInstance PRIVATE utils) - -endif() +vulkan_hpp__setup_sample_static( NAME 01_InitInstance ) diff --git a/samples/02_EnumerateDevices/02_EnumerateDevices.cpp b/samples/02_EnumerateDevices/02_EnumerateDevices.cpp index 5159e6d..1fe0aaf 100644 --- a/samples/02_EnumerateDevices/02_EnumerateDevices.cpp +++ b/samples/02_EnumerateDevices/02_EnumerateDevices.cpp @@ -26,7 +26,6 @@ #endif #include "../utils/utils.hpp" -#include "vulkan/vulkan.hpp" #include diff --git a/samples/02_EnumerateDevices/CMakeLists.txt b/samples/02_EnumerateDevices/CMakeLists.txt index 2af18ae..1aa23a3 100644 --- a/samples/02_EnumerateDevices/CMakeLists.txt +++ b/samples/02_EnumerateDevices/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(02_EnumerateDevices) - -set(HEADERS -) - -set(SOURCES - 02_EnumerateDevices.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(02_EnumerateDevices - ${HEADERS} - ${SOURCES} -) - -set_target_properties(02_EnumerateDevices PROPERTIES FOLDER "Samples") -target_link_libraries(02_EnumerateDevices PRIVATE utils) +vulkan_hpp__setup_sample_dynamic( NAME 02_EnumerateDevices ) diff --git a/samples/03_InitDevice/03_InitDevice.cpp b/samples/03_InitDevice/03_InitDevice.cpp index e52c480..9bf2bd1 100644 --- a/samples/03_InitDevice/03_InitDevice.cpp +++ b/samples/03_InitDevice/03_InitDevice.cpp @@ -16,7 +16,6 @@ // Create and destroy a device #include "../utils/utils.hpp" -#include "vulkan/vulkan.hpp" #include diff --git a/samples/03_InitDevice/CMakeLists.txt b/samples/03_InitDevice/CMakeLists.txt index 1c18888..cfa8116 100644 --- a/samples/03_InitDevice/CMakeLists.txt +++ b/samples/03_InitDevice/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(03_InitDevice) - -set(HEADERS -) - -set(SOURCES - 03_InitDevice.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(03_InitDevice - ${HEADERS} - ${SOURCES} -) - -set_target_properties(03_InitDevice PROPERTIES FOLDER "Samples") -target_link_libraries(03_InitDevice PRIVATE utils) +vulkan_hpp__setup_sample_dynamic( NAME 03_InitDevice ) diff --git a/samples/04_InitCommandBuffer/04_InitCommandBuffer.cpp b/samples/04_InitCommandBuffer/04_InitCommandBuffer.cpp index 434c0b7..f3d0f12 100644 --- a/samples/04_InitCommandBuffer/04_InitCommandBuffer.cpp +++ b/samples/04_InitCommandBuffer/04_InitCommandBuffer.cpp @@ -16,7 +16,6 @@ // Create command buffer #include "../utils/utils.hpp" -#include "vulkan/vulkan.hpp" #include diff --git a/samples/04_InitCommandBuffer/CMakeLists.txt b/samples/04_InitCommandBuffer/CMakeLists.txt index ba88c56..4448111 100644 --- a/samples/04_InitCommandBuffer/CMakeLists.txt +++ b/samples/04_InitCommandBuffer/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(04_InitCommandBuffer) - -set(HEADERS -) - -set(SOURCES - 04_InitCommandBuffer.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(04_InitCommandBuffer - ${HEADERS} - ${SOURCES} -) - -set_target_properties(04_InitCommandBuffer PROPERTIES FOLDER "Samples") -target_link_libraries(04_InitCommandBuffer PRIVATE utils) +vulkan_hpp__setup_sample_dynamic( NAME 04_InitCommandBuffer ) diff --git a/samples/05_InitSwapchain/05_InitSwapchain.cpp b/samples/05_InitSwapchain/05_InitSwapchain.cpp index 0006d04..9a0abbe 100644 --- a/samples/05_InitSwapchain/05_InitSwapchain.cpp +++ b/samples/05_InitSwapchain/05_InitSwapchain.cpp @@ -16,7 +16,6 @@ // Initialize a swapchain #include "../utils/utils.hpp" -#include "vulkan/vulkan.hpp" #include @@ -52,8 +51,8 @@ int main( int /*argc*/, char ** /*argv*/ ) // determine a queueFamilyIndex that suports present // first check if the graphicsQueueFamiliyIndex is good enough size_t presentQueueFamilyIndex = physicalDevice.getSurfaceSupportKHR( static_cast( graphicsQueueFamilyIndex ), surface ) - ? graphicsQueueFamilyIndex - : queueFamilyProperties.size(); + ? graphicsQueueFamilyIndex + : queueFamilyProperties.size(); if ( presentQueueFamilyIndex == queueFamilyProperties.size() ) { // the graphicsQueueFamilyIndex doesn't support present -> look for an other family index that supports both @@ -113,8 +112,8 @@ int main( int /*argc*/, char ** /*argv*/ ) vk::PresentModeKHR swapchainPresentMode = vk::PresentModeKHR::eFifo; vk::SurfaceTransformFlagBitsKHR preTransform = ( surfaceCapabilities.supportedTransforms & vk::SurfaceTransformFlagBitsKHR::eIdentity ) - ? vk::SurfaceTransformFlagBitsKHR::eIdentity - : surfaceCapabilities.currentTransform; + ? vk::SurfaceTransformFlagBitsKHR::eIdentity + : surfaceCapabilities.currentTransform; vk::CompositeAlphaFlagBitsKHR compositeAlpha = ( surfaceCapabilities.supportedCompositeAlpha & vk::CompositeAlphaFlagBitsKHR::ePreMultiplied ) ? vk::CompositeAlphaFlagBitsKHR::ePreMultiplied diff --git a/samples/05_InitSwapchain/CMakeLists.txt b/samples/05_InitSwapchain/CMakeLists.txt index f5b9ed5..666c6f3 100644 --- a/samples/05_InitSwapchain/CMakeLists.txt +++ b/samples/05_InitSwapchain/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(05_InitSwapchain) - -set(HEADERS -) - -set(SOURCES - 05_InitSwapchain.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(05_InitSwapchain - ${HEADERS} - ${SOURCES} -) - -set_target_properties(05_InitSwapchain PROPERTIES FOLDER "Samples") -target_link_libraries(05_InitSwapchain PRIVATE utils) +vulkan_hpp__setup_sample_dynamic( NAME 05_InitSwapchain ) diff --git a/samples/06_InitDepthBuffer/06_InitDepthBuffer.cpp b/samples/06_InitDepthBuffer/06_InitDepthBuffer.cpp index 46d26bf..5403838 100644 --- a/samples/06_InitDepthBuffer/06_InitDepthBuffer.cpp +++ b/samples/06_InitDepthBuffer/06_InitDepthBuffer.cpp @@ -16,7 +16,6 @@ // Initialize a depth buffer #include "../utils/utils.hpp" -#include "vulkan/vulkan.hpp" #include diff --git a/samples/06_InitDepthBuffer/CMakeLists.txt b/samples/06_InitDepthBuffer/CMakeLists.txt index 769ba48..d44bbd0 100644 --- a/samples/06_InitDepthBuffer/CMakeLists.txt +++ b/samples/06_InitDepthBuffer/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(06_InitDepthBuffer) - -set(HEADERS -) - -set(SOURCES - 06_InitDepthBuffer.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(06_InitDepthBuffer - ${HEADERS} - ${SOURCES} -) - -set_target_properties(06_InitDepthBuffer PROPERTIES FOLDER "Samples") -target_link_libraries(06_InitDepthBuffer PRIVATE utils) +vulkan_hpp__setup_sample_dynamic( NAME 06_InitDepthBuffer ) diff --git a/samples/07_InitUniformBuffer/07_InitUniformBuffer.cpp b/samples/07_InitUniformBuffer/07_InitUniformBuffer.cpp index 1df8465..f78e70a 100644 --- a/samples/07_InitUniformBuffer/07_InitUniformBuffer.cpp +++ b/samples/07_InitUniformBuffer/07_InitUniformBuffer.cpp @@ -26,7 +26,6 @@ #endif #include "../utils/utils.hpp" -#include "vulkan/vulkan.hpp" #include diff --git a/samples/07_InitUniformBuffer/CMakeLists.txt b/samples/07_InitUniformBuffer/CMakeLists.txt index 8c0b78b..1321263 100644 --- a/samples/07_InitUniformBuffer/CMakeLists.txt +++ b/samples/07_InitUniformBuffer/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(07_InitUniformBuffer) - -set(HEADERS -) - -set(SOURCES - 07_InitUniformBuffer.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(07_InitUniformBuffer - ${HEADERS} - ${SOURCES} -) - -set_target_properties(07_InitUniformBuffer PROPERTIES FOLDER "Samples") -target_link_libraries(07_InitUniformBuffer PRIVATE utils) +vulkan_hpp__setup_sample_dynamic( NAME 07_InitUniformBuffer ) diff --git a/samples/08_InitPipelineLayout/08_InitPipelineLayout.cpp b/samples/08_InitPipelineLayout/08_InitPipelineLayout.cpp index da6933d..1a12137 100644 --- a/samples/08_InitPipelineLayout/08_InitPipelineLayout.cpp +++ b/samples/08_InitPipelineLayout/08_InitPipelineLayout.cpp @@ -16,7 +16,6 @@ // Initialize a descriptor and pipeline layout #include "../utils/utils.hpp" -#include "vulkan/vulkan.hpp" #include diff --git a/samples/08_InitPipelineLayout/CMakeLists.txt b/samples/08_InitPipelineLayout/CMakeLists.txt index 79b8ac8..494e799 100644 --- a/samples/08_InitPipelineLayout/CMakeLists.txt +++ b/samples/08_InitPipelineLayout/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(08_InitPipelineLayout) - -set(HEADERS -) - -set(SOURCES - 08_InitPipelineLayout.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(08_InitPipelineLayout - ${HEADERS} - ${SOURCES} -) - -set_target_properties(08_InitPipelineLayout PROPERTIES FOLDER "Samples") -target_link_libraries(08_InitPipelineLayout PRIVATE utils) +vulkan_hpp__setup_sample_dynamic( NAME 08_InitPipelineLayout ) diff --git a/samples/09_InitDescriptorSet/09_InitDescriptorSet.cpp b/samples/09_InitDescriptorSet/09_InitDescriptorSet.cpp index d7a0066..59dfdd5 100644 --- a/samples/09_InitDescriptorSet/09_InitDescriptorSet.cpp +++ b/samples/09_InitDescriptorSet/09_InitDescriptorSet.cpp @@ -26,7 +26,6 @@ #include "../utils/math.hpp" #include "../utils/utils.hpp" -#include "vulkan/vulkan.hpp" #include diff --git a/samples/09_InitDescriptorSet/CMakeLists.txt b/samples/09_InitDescriptorSet/CMakeLists.txt index 0601b76..0106180 100644 --- a/samples/09_InitDescriptorSet/CMakeLists.txt +++ b/samples/09_InitDescriptorSet/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(09_InitDescriptorSet) - -set(HEADERS -) - -set(SOURCES - 09_InitDescriptorSet.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(09_InitDescriptorSet - ${HEADERS} - ${SOURCES} -) - -set_target_properties(09_InitDescriptorSet PROPERTIES FOLDER "Samples") -target_link_libraries(09_InitDescriptorSet PRIVATE utils) +vulkan_hpp__setup_sample_dynamic( NAME 09_InitDescriptorSet ) diff --git a/samples/10_InitRenderPass/10_InitRenderPass.cpp b/samples/10_InitRenderPass/10_InitRenderPass.cpp index ee01448..dada710 100644 --- a/samples/10_InitRenderPass/10_InitRenderPass.cpp +++ b/samples/10_InitRenderPass/10_InitRenderPass.cpp @@ -25,7 +25,6 @@ #endif #include "../utils/utils.hpp" -#include "vulkan/vulkan.hpp" #include diff --git a/samples/10_InitRenderPass/CMakeLists.txt b/samples/10_InitRenderPass/CMakeLists.txt index f203655..c8a24af 100644 --- a/samples/10_InitRenderPass/CMakeLists.txt +++ b/samples/10_InitRenderPass/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(10_InitRenderPass) - -set(HEADERS -) - -set(SOURCES - 10_InitRenderPass.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(10_InitRenderPass - ${HEADERS} - ${SOURCES} -) - -set_target_properties(10_InitRenderPass PROPERTIES FOLDER "Samples") -target_link_libraries(10_InitRenderPass PRIVATE utils) +vulkan_hpp__setup_sample_dynamic( NAME 10_InitRenderPass ) diff --git a/samples/11_InitShaders/11_InitShaders.cpp b/samples/11_InitShaders/11_InitShaders.cpp index 943b9fd..b1f91af 100644 --- a/samples/11_InitShaders/11_InitShaders.cpp +++ b/samples/11_InitShaders/11_InitShaders.cpp @@ -18,7 +18,6 @@ #include "../utils/shaders.hpp" #include "../utils/utils.hpp" #include "SPIRV/GlslangToSpv.h" -#include "vulkan/vulkan.hpp" #include diff --git a/samples/11_InitShaders/CMakeLists.txt b/samples/11_InitShaders/CMakeLists.txt index 8dfd704..085de46 100644 --- a/samples/11_InitShaders/CMakeLists.txt +++ b/samples/11_InitShaders/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(11_InitShaders) - -set(HEADERS -) - -set(SOURCES - 11_InitShaders.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(11_InitShaders - ${HEADERS} - ${SOURCES} -) - -set_target_properties(11_InitShaders PROPERTIES FOLDER "Samples") -target_link_libraries(11_InitShaders PRIVATE utils) +vulkan_hpp__setup_sample_dynamic( NAME 11_InitShaders ) diff --git a/samples/12_InitFrameBuffers/12_InitFrameBuffers.cpp b/samples/12_InitFrameBuffers/12_InitFrameBuffers.cpp index 3c358ab..4c80f21 100644 --- a/samples/12_InitFrameBuffers/12_InitFrameBuffers.cpp +++ b/samples/12_InitFrameBuffers/12_InitFrameBuffers.cpp @@ -16,7 +16,6 @@ // Initialize framebuffers #include "../utils/utils.hpp" -#include "vulkan/vulkan.hpp" #include diff --git a/samples/12_InitFrameBuffers/CMakeLists.txt b/samples/12_InitFrameBuffers/CMakeLists.txt index 1b17c3c..203bed0 100644 --- a/samples/12_InitFrameBuffers/CMakeLists.txt +++ b/samples/12_InitFrameBuffers/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(12_InitFrameBuffers) - -set(HEADERS -) - -set(SOURCES - 12_InitFrameBuffers.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(12_InitFrameBuffers - ${HEADERS} - ${SOURCES} -) - -set_target_properties(12_InitFrameBuffers PROPERTIES FOLDER "Samples") -target_link_libraries(12_InitFrameBuffers PRIVATE utils) +vulkan_hpp__setup_sample_dynamic( NAME 12_InitFrameBuffers ) diff --git a/samples/13_InitVertexBuffer/13_InitVertexBuffer.cpp b/samples/13_InitVertexBuffer/13_InitVertexBuffer.cpp index 5c63efc..c12ec13 100644 --- a/samples/13_InitVertexBuffer/13_InitVertexBuffer.cpp +++ b/samples/13_InitVertexBuffer/13_InitVertexBuffer.cpp @@ -17,7 +17,6 @@ #include "../utils/geometries.hpp" #include "../utils/utils.hpp" -#include "vulkan/vulkan.hpp" #include diff --git a/samples/13_InitVertexBuffer/CMakeLists.txt b/samples/13_InitVertexBuffer/CMakeLists.txt index 2fefa70..0203e80 100644 --- a/samples/13_InitVertexBuffer/CMakeLists.txt +++ b/samples/13_InitVertexBuffer/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(13_InitVertexBuffer) - -set(HEADERS -) - -set(SOURCES - 13_InitVertexBuffer.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(13_InitVertexBuffer - ${HEADERS} - ${SOURCES} -) - -set_target_properties(13_InitVertexBuffer PROPERTIES FOLDER "Samples") -target_link_libraries(13_InitVertexBuffer PRIVATE utils) +vulkan_hpp__setup_sample_dynamic( NAME 13_InitVertexBuffer ) diff --git a/samples/14_InitPipeline/14_InitPipeline.cpp b/samples/14_InitPipeline/14_InitPipeline.cpp index f680e01..022660b 100644 --- a/samples/14_InitPipeline/14_InitPipeline.cpp +++ b/samples/14_InitPipeline/14_InitPipeline.cpp @@ -30,7 +30,6 @@ #include "../utils/shaders.hpp" #include "../utils/utils.hpp" #include "SPIRV/GlslangToSpv.h" -#include "vulkan/vulkan.hpp" #include diff --git a/samples/14_InitPipeline/CMakeLists.txt b/samples/14_InitPipeline/CMakeLists.txt index 7991ad7..22b77dd 100644 --- a/samples/14_InitPipeline/CMakeLists.txt +++ b/samples/14_InitPipeline/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(14_InitPipeline) - -set(HEADERS -) - -set(SOURCES - 14_InitPipeline.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(14_InitPipeline - ${HEADERS} - ${SOURCES} -) - -set_target_properties(14_InitPipeline PROPERTIES FOLDER "Samples") -target_link_libraries(14_InitPipeline PRIVATE utils) +vulkan_hpp__setup_sample_dynamic( NAME 14_InitPipeline ) diff --git a/samples/15_DrawCube/15_DrawCube.cpp b/samples/15_DrawCube/15_DrawCube.cpp index ec30541..5a2ed5a 100644 --- a/samples/15_DrawCube/15_DrawCube.cpp +++ b/samples/15_DrawCube/15_DrawCube.cpp @@ -20,7 +20,6 @@ #include "../utils/shaders.hpp" #include "../utils/utils.hpp" #include "SPIRV/GlslangToSpv.h" -#include "vulkan/vulkan.hpp" #include #include diff --git a/samples/15_DrawCube/CMakeLists.txt b/samples/15_DrawCube/CMakeLists.txt index 35834e7..2bae8a0 100644 --- a/samples/15_DrawCube/CMakeLists.txt +++ b/samples/15_DrawCube/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(15_DrawCube) - -set(HEADERS -) - -set(SOURCES - 15_DrawCube.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(15_DrawCube - ${HEADERS} - ${SOURCES} -) - -set_target_properties(15_DrawCube PROPERTIES FOLDER "Samples") -target_link_libraries(15_DrawCube PRIVATE utils) +vulkan_hpp__setup_sample_dynamic( NAME 15_DrawCube ) diff --git a/samples/16_Vulkan_1_1/16_Vulkan_1_1.cpp b/samples/16_Vulkan_1_1/16_Vulkan_1_1.cpp index 12a954f..9b0bb06 100644 --- a/samples/16_Vulkan_1_1/16_Vulkan_1_1.cpp +++ b/samples/16_Vulkan_1_1/16_Vulkan_1_1.cpp @@ -16,7 +16,6 @@ // Determine if the current system can use Vulkan 1.1 API features #include "../utils/utils.hpp" -#include "vulkan/vulkan.hpp" static char const * AppName = "16_Vulkan_1_1"; static char const * EngineName = "Vulkan.hpp"; diff --git a/samples/16_Vulkan_1_1/CMakeLists.txt b/samples/16_Vulkan_1_1/CMakeLists.txt index 4094411..a1aaaae 100644 --- a/samples/16_Vulkan_1_1/CMakeLists.txt +++ b/samples/16_Vulkan_1_1/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(16_Vulkan_1_1) - -set(HEADERS -) - -set(SOURCES - 16_Vulkan_1_1.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(16_Vulkan_1_1 - ${HEADERS} - ${SOURCES} -) - -set_target_properties(16_Vulkan_1_1 PROPERTIES FOLDER "Samples") -target_link_libraries(16_Vulkan_1_1 PRIVATE utils) +vulkan_hpp__setup_sample_dynamic( NAME 16_Vulkan_1_1 ) diff --git a/samples/CopyBlitImage/CMakeLists.txt b/samples/CopyBlitImage/CMakeLists.txt index 85a6d64..6e1721c 100644 --- a/samples/CopyBlitImage/CMakeLists.txt +++ b/samples/CopyBlitImage/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(CopyBlitImage) - -set(HEADERS -) - -set(SOURCES - CopyBlitImage.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(CopyBlitImage - ${HEADERS} - ${SOURCES} -) - -set_target_properties(CopyBlitImage PROPERTIES FOLDER "Samples") -target_link_libraries(CopyBlitImage PRIVATE utils) +vulkan_hpp__setup_sample_dynamic( NAME CopyBlitImage ) diff --git a/samples/CopyBlitImage/CopyBlitImage.cpp b/samples/CopyBlitImage/CopyBlitImage.cpp index 36bc6b6..6cdf3e4 100644 --- a/samples/CopyBlitImage/CopyBlitImage.cpp +++ b/samples/CopyBlitImage/CopyBlitImage.cpp @@ -16,7 +16,6 @@ // Draw a cube #include "../utils/utils.hpp" -#include "vulkan/vulkan.hpp" #include diff --git a/samples/CreateDebugUtilsMessenger/CMakeLists.txt b/samples/CreateDebugUtilsMessenger/CMakeLists.txt index c57bb21..5a303d6 100644 --- a/samples/CreateDebugUtilsMessenger/CMakeLists.txt +++ b/samples/CreateDebugUtilsMessenger/CMakeLists.txt @@ -14,26 +14,4 @@ cmake_minimum_required(VERSION 3.2) -if(NOT SAMPLES_BUILD_ONLY_DYNAMIC) - - project(CreateDebugUtilsMessenger) - - set(HEADERS - ) - - set(SOURCES - CreateDebugUtilsMessenger.cpp - ) - - source_group(headers FILES ${HEADERS}) - source_group(sources FILES ${SOURCES}) - - add_executable(CreateDebugUtilsMessenger - ${HEADERS} - ${SOURCES} - ) - - set_target_properties(CreateDebugUtilsMessenger PROPERTIES FOLDER "Samples") - target_link_libraries(CreateDebugUtilsMessenger PRIVATE utils) - -endif() +vulkan_hpp__setup_sample_static( NAME CreateDebugUtilsMessenger ) diff --git a/samples/DebugUtilsObjectName/CMakeLists.txt b/samples/DebugUtilsObjectName/CMakeLists.txt index 2020d77..207796e 100644 --- a/samples/DebugUtilsObjectName/CMakeLists.txt +++ b/samples/DebugUtilsObjectName/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(DebugUtilsObjectName) - -set(HEADERS -) - -set(SOURCES - DebugUtilsObjectName.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(DebugUtilsObjectName - ${HEADERS} - ${SOURCES} -) - -set_target_properties(DebugUtilsObjectName PROPERTIES FOLDER "Samples") -target_link_libraries(DebugUtilsObjectName PRIVATE utils) +vulkan_hpp__setup_sample_dynamic( NAME DebugUtilsObjectName ) diff --git a/samples/DebugUtilsObjectName/DebugUtilsObjectName.cpp b/samples/DebugUtilsObjectName/DebugUtilsObjectName.cpp index 5e0c856..29864ab 100644 --- a/samples/DebugUtilsObjectName/DebugUtilsObjectName.cpp +++ b/samples/DebugUtilsObjectName/DebugUtilsObjectName.cpp @@ -16,7 +16,6 @@ // Demonstrate usage of DebugUtilsObjectName #include "../utils/utils.hpp" -#include "vulkan/vulkan.hpp" static char const * AppName = "DebugUtilsObjectName"; static char const * EngineName = "Vulkan.hpp"; diff --git a/samples/DrawTexturedCube/CMakeLists.txt b/samples/DrawTexturedCube/CMakeLists.txt index 497beb5..9ee833b 100644 --- a/samples/DrawTexturedCube/CMakeLists.txt +++ b/samples/DrawTexturedCube/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(DrawTexturedCube) - -set(HEADERS -) - -set(SOURCES - DrawTexturedCube.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(DrawTexturedCube - ${HEADERS} - ${SOURCES} -) - -set_target_properties(DrawTexturedCube PROPERTIES FOLDER "Samples") -target_link_libraries(DrawTexturedCube PRIVATE utils) +vulkan_hpp__setup_sample_dynamic( NAME DrawTexturedCube ) diff --git a/samples/DrawTexturedCube/DrawTexturedCube.cpp b/samples/DrawTexturedCube/DrawTexturedCube.cpp index 6b6ee5e..880c33e 100644 --- a/samples/DrawTexturedCube/DrawTexturedCube.cpp +++ b/samples/DrawTexturedCube/DrawTexturedCube.cpp @@ -20,7 +20,6 @@ #include "../utils/shaders.hpp" #include "../utils/utils.hpp" #include "SPIRV/GlslangToSpv.h" -#include "vulkan/vulkan.hpp" #include #include diff --git a/samples/DynamicUniform/CMakeLists.txt b/samples/DynamicUniform/CMakeLists.txt index 38459c4..dd2470f 100644 --- a/samples/DynamicUniform/CMakeLists.txt +++ b/samples/DynamicUniform/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(DynamicUniform) - -set(HEADERS -) - -set(SOURCES - DynamicUniform.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(DynamicUniform - ${HEADERS} - ${SOURCES} -) - -set_target_properties(DynamicUniform PROPERTIES FOLDER "Samples") -target_link_libraries(DynamicUniform PRIVATE utils) +vulkan_hpp__setup_sample_dynamic( NAME DynamicUniform ) diff --git a/samples/DynamicUniform/DynamicUniform.cpp b/samples/DynamicUniform/DynamicUniform.cpp index 73f3a1a..868a4d4 100644 --- a/samples/DynamicUniform/DynamicUniform.cpp +++ b/samples/DynamicUniform/DynamicUniform.cpp @@ -31,8 +31,6 @@ # pragma warning( pop ) #endif -#include "vulkan/vulkan.hpp" - #include #include diff --git a/samples/EnableValidationWithCallback/CMakeLists.txt b/samples/EnableValidationWithCallback/CMakeLists.txt index 3e18447..c2cacad 100644 --- a/samples/EnableValidationWithCallback/CMakeLists.txt +++ b/samples/EnableValidationWithCallback/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(EnableValidationWithCallback) - -set(HEADERS -) - -set(SOURCES - EnableValidationWithCallback.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(EnableValidationWithCallback - ${HEADERS} - ${SOURCES} -) - -set_target_properties(EnableValidationWithCallback PROPERTIES FOLDER "Samples") -target_link_libraries(EnableValidationWithCallback PRIVATE utils) +vulkan_hpp__setup_sample_dynamic( NAME EnableValidationWithCallback ) diff --git a/samples/EnableValidationWithCallback/EnableValidationWithCallback.cpp b/samples/EnableValidationWithCallback/EnableValidationWithCallback.cpp index 8ad9b4d..ed11a42 100644 --- a/samples/EnableValidationWithCallback/EnableValidationWithCallback.cpp +++ b/samples/EnableValidationWithCallback/EnableValidationWithCallback.cpp @@ -30,7 +30,6 @@ #include #include #include -#include #include static char const * AppName = "EnableValidationWithCallback"; diff --git a/samples/EnumerateDevicesAdvanced/CMakeLists.txt b/samples/EnumerateDevicesAdvanced/CMakeLists.txt index 39661bd..91629cb 100644 --- a/samples/EnumerateDevicesAdvanced/CMakeLists.txt +++ b/samples/EnumerateDevicesAdvanced/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(EnumerateDevicesAdvanced) - -set(HEADERS -) - -set(SOURCES - EnumerateDevicesAdvanced.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(EnumerateDevicesAdvanced - ${HEADERS} - ${SOURCES} -) - -set_target_properties(EnumerateDevicesAdvanced PROPERTIES FOLDER "Samples") -target_link_libraries(EnumerateDevicesAdvanced PRIVATE utils) +vulkan_hpp__setup_sample_dynamic( NAME EnumerateDevicesAdvanced ) diff --git a/samples/EnumerateDevicesAdvanced/EnumerateDevicesAdvanced.cpp b/samples/EnumerateDevicesAdvanced/EnumerateDevicesAdvanced.cpp index 8142361..e294b57 100644 --- a/samples/EnumerateDevicesAdvanced/EnumerateDevicesAdvanced.cpp +++ b/samples/EnumerateDevicesAdvanced/EnumerateDevicesAdvanced.cpp @@ -19,7 +19,6 @@ #include #include -#include #include static char const * AppName = "EnumerateDevicesAdvanced"; diff --git a/samples/Events/CMakeLists.txt b/samples/Events/CMakeLists.txt index 09beb61..861f0f9 100644 --- a/samples/Events/CMakeLists.txt +++ b/samples/Events/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(Events) - -set(HEADERS -) - -set(SOURCES - Events.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(Events - ${HEADERS} - ${SOURCES} -) - -set_target_properties(Events PROPERTIES FOLDER "Samples") -target_link_libraries(Events PRIVATE utils) +vulkan_hpp__setup_sample_dynamic( NAME Events ) diff --git a/samples/Events/Events.cpp b/samples/Events/Events.cpp index f7eaf2f..be4f46c 100644 --- a/samples/Events/Events.cpp +++ b/samples/Events/Events.cpp @@ -16,7 +16,6 @@ // Use basic events #include "../utils/utils.hpp" -#include "vulkan/vulkan.hpp" #include diff --git a/samples/ImmutableSampler/CMakeLists.txt b/samples/ImmutableSampler/CMakeLists.txt index 9928b70..69eda5b 100644 --- a/samples/ImmutableSampler/CMakeLists.txt +++ b/samples/ImmutableSampler/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(ImmutableSampler) - -set(HEADERS -) - -set(SOURCES - ImmutableSampler.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(ImmutableSampler - ${HEADERS} - ${SOURCES} -) - -set_target_properties(ImmutableSampler PROPERTIES FOLDER "Samples") -target_link_libraries(ImmutableSampler PRIVATE utils) +vulkan_hpp__setup_sample_dynamic( NAME ImmutableSampler ) diff --git a/samples/ImmutableSampler/ImmutableSampler.cpp b/samples/ImmutableSampler/ImmutableSampler.cpp index 461cd28..a0e208d 100644 --- a/samples/ImmutableSampler/ImmutableSampler.cpp +++ b/samples/ImmutableSampler/ImmutableSampler.cpp @@ -29,7 +29,6 @@ #include "../utils/shaders.hpp" #include "../utils/utils.hpp" #include "SPIRV/GlslangToSpv.h" -#include "vulkan/vulkan.hpp" #include #include diff --git a/samples/InitTexture/CMakeLists.txt b/samples/InitTexture/CMakeLists.txt index bdfb760..521bce5 100644 --- a/samples/InitTexture/CMakeLists.txt +++ b/samples/InitTexture/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(InitTexture) - -set(HEADERS -) - -set(SOURCES - InitTexture.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(InitTexture - ${HEADERS} - ${SOURCES} -) - -set_target_properties(InitTexture PROPERTIES FOLDER "Samples") -target_link_libraries(InitTexture PRIVATE utils) +vulkan_hpp__setup_sample_dynamic( NAME InitTexture ) diff --git a/samples/InitTexture/InitTexture.cpp b/samples/InitTexture/InitTexture.cpp index dbaf27e..7669d2a 100644 --- a/samples/InitTexture/InitTexture.cpp +++ b/samples/InitTexture/InitTexture.cpp @@ -30,7 +30,6 @@ #include "../utils/shaders.hpp" #include "../utils/utils.hpp" #include "SPIRV/GlslangToSpv.h" -#include "vulkan/vulkan.hpp" #include diff --git a/samples/InputAttachment/CMakeLists.txt b/samples/InputAttachment/CMakeLists.txt index 25f869b..99867aa 100644 --- a/samples/InputAttachment/CMakeLists.txt +++ b/samples/InputAttachment/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(InputAttachment) - -set(HEADERS -) - -set(SOURCES - InputAttachment.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(InputAttachment - ${HEADERS} - ${SOURCES} -) - -set_target_properties(InputAttachment PROPERTIES FOLDER "Samples") -target_link_libraries(InputAttachment PRIVATE utils) +vulkan_hpp__setup_sample_dynamic( NAME InputAttachment ) diff --git a/samples/InputAttachment/InputAttachment.cpp b/samples/InputAttachment/InputAttachment.cpp index ec82938..c499e9b 100644 --- a/samples/InputAttachment/InputAttachment.cpp +++ b/samples/InputAttachment/InputAttachment.cpp @@ -30,7 +30,6 @@ #include "../utils/shaders.hpp" #include "../utils/utils.hpp" #include "SPIRV/GlslangToSpv.h" -#include "vulkan/vulkan.hpp" #include #include diff --git a/samples/InstanceExtensionProperties/CMakeLists.txt b/samples/InstanceExtensionProperties/CMakeLists.txt index 0e1729a..725df9d 100644 --- a/samples/InstanceExtensionProperties/CMakeLists.txt +++ b/samples/InstanceExtensionProperties/CMakeLists.txt @@ -14,26 +14,4 @@ cmake_minimum_required(VERSION 3.2) -if(NOT SAMPLES_BUILD_ONLY_DYNAMIC) - - project(InstanceExtensionProperties) - - set(HEADERS - ) - - set(SOURCES - InstanceExtensionProperties.cpp - ) - - source_group(headers FILES ${HEADERS}) - source_group(sources FILES ${SOURCES}) - - add_executable(InstanceExtensionProperties - ${HEADERS} - ${SOURCES} - ) - - set_target_properties(InstanceExtensionProperties PROPERTIES FOLDER "Samples") - target_link_libraries(InstanceExtensionProperties PRIVATE utils) - -endif() +vulkan_hpp__setup_sample_static( NAME InstanceExtensionProperties ) diff --git a/samples/InstanceExtensionProperties/InstanceExtensionProperties.cpp b/samples/InstanceExtensionProperties/InstanceExtensionProperties.cpp index 7cffdde..1f4ba37 100644 --- a/samples/InstanceExtensionProperties/InstanceExtensionProperties.cpp +++ b/samples/InstanceExtensionProperties/InstanceExtensionProperties.cpp @@ -16,10 +16,9 @@ // Get global extension properties to know what extension are available to enable at CreateInstance // time. -#include "vulkan/vulkan.hpp" - #include #include +#include int main( int /*argc*/, char ** /*argv*/ ) { diff --git a/samples/InstanceLayerExtensionProperties/CMakeLists.txt b/samples/InstanceLayerExtensionProperties/CMakeLists.txt index f233432..2612b60 100644 --- a/samples/InstanceLayerExtensionProperties/CMakeLists.txt +++ b/samples/InstanceLayerExtensionProperties/CMakeLists.txt @@ -14,26 +14,4 @@ cmake_minimum_required(VERSION 3.2) -if(NOT SAMPLES_BUILD_ONLY_DYNAMIC) - - project(InstanceLayerExtensionProperties) - - set(HEADERS - ) - - set(SOURCES - InstanceLayerExtensionProperties.cpp - ) - - source_group(headers FILES ${HEADERS}) - source_group(sources FILES ${SOURCES}) - - add_executable(InstanceLayerExtensionProperties - ${HEADERS} - ${SOURCES} - ) - - set_target_properties(InstanceLayerExtensionProperties PROPERTIES FOLDER "Samples") - target_link_libraries(InstanceLayerExtensionProperties PRIVATE utils) - -endif() +vulkan_hpp__setup_sample_static( NAME InstanceLayerExtensionProperties ) diff --git a/samples/InstanceLayerExtensionProperties/InstanceLayerExtensionProperties.cpp b/samples/InstanceLayerExtensionProperties/InstanceLayerExtensionProperties.cpp index 2052138..dd3cbe5 100644 --- a/samples/InstanceLayerExtensionProperties/InstanceLayerExtensionProperties.cpp +++ b/samples/InstanceLayerExtensionProperties/InstanceLayerExtensionProperties.cpp @@ -15,17 +15,17 @@ // VulkanHpp Samples : InstanceLayerExtensionProperties // Get list of global layers and their associated extensions, if any. -#include "vulkan/vulkan.hpp" - #include #include #include +#include struct PropertyData { PropertyData( vk::LayerProperties const & layerProperties_, std::vector const & extensionProperties_ ) : layerProperties( layerProperties_ ), extensionProperties( extensionProperties_ ) - {} + { + } vk::LayerProperties layerProperties; std::vector extensionProperties; diff --git a/samples/InstanceLayerProperties/CMakeLists.txt b/samples/InstanceLayerProperties/CMakeLists.txt index 6dd1364..393db90 100644 --- a/samples/InstanceLayerProperties/CMakeLists.txt +++ b/samples/InstanceLayerProperties/CMakeLists.txt @@ -14,26 +14,4 @@ cmake_minimum_required(VERSION 3.2) -if(NOT SAMPLES_BUILD_ONLY_DYNAMIC) - - project(InstanceLayerProperties) - - set(HEADERS - ) - - set(SOURCES - InstanceLayerProperties.cpp - ) - - source_group(headers FILES ${HEADERS}) - source_group(sources FILES ${SOURCES}) - - add_executable(InstanceLayerProperties - ${HEADERS} - ${SOURCES} - ) - - set_target_properties(InstanceLayerProperties PROPERTIES FOLDER "Samples") - target_link_libraries(InstanceLayerProperties PRIVATE utils) - -endif() +vulkan_hpp__setup_sample_static( NAME InstanceLayerProperties ) diff --git a/samples/InstanceLayerProperties/InstanceLayerProperties.cpp b/samples/InstanceLayerProperties/InstanceLayerProperties.cpp index 27110e0..23d38eb 100644 --- a/samples/InstanceLayerProperties/InstanceLayerProperties.cpp +++ b/samples/InstanceLayerProperties/InstanceLayerProperties.cpp @@ -15,11 +15,10 @@ // VulkanHpp Samples : InstanceLayerProperties // Get global layer properties to know what layers are available to enable at CreateInstance time. -#include "vulkan/vulkan.hpp" - #include #include #include +#include int main( int /*argc*/, char ** /*argv*/ ) { diff --git a/samples/InstanceVersion/CMakeLists.txt b/samples/InstanceVersion/CMakeLists.txt index 05c83ca..2e3db4a 100644 --- a/samples/InstanceVersion/CMakeLists.txt +++ b/samples/InstanceVersion/CMakeLists.txt @@ -14,26 +14,4 @@ cmake_minimum_required(VERSION 3.2) -if(NOT SAMPLES_BUILD_ONLY_DYNAMIC) - - project(InstanceVersion) - - set(HEADERS - ) - - set(SOURCES - InstanceVersion.cpp - ) - - source_group(headers FILES ${HEADERS}) - source_group(sources FILES ${SOURCES}) - - add_executable(InstanceVersion - ${HEADERS} - ${SOURCES} - ) - - set_target_properties(InstanceVersion PROPERTIES FOLDER "Samples") - target_link_libraries(InstanceVersion PRIVATE utils) - -endif() +vulkan_hpp__setup_sample_static( NAME InstanceVersion ) diff --git a/samples/InstanceVersion/InstanceVersion.cpp b/samples/InstanceVersion/InstanceVersion.cpp index c565891..df9c015 100644 --- a/samples/InstanceVersion/InstanceVersion.cpp +++ b/samples/InstanceVersion/InstanceVersion.cpp @@ -15,10 +15,9 @@ // VulkanHpp Samples : InstanceVersion // Get the version of instance-level functionality supported by the implementation. -#include "vulkan/vulkan.hpp" - #include #include +#include std::string decodeAPIVersion( uint32_t apiVersion ) { diff --git a/samples/MultipleSets/CMakeLists.txt b/samples/MultipleSets/CMakeLists.txt index 2633dd4..1a1e623 100644 --- a/samples/MultipleSets/CMakeLists.txt +++ b/samples/MultipleSets/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(MultipleSets) - -set(HEADERS -) - -set(SOURCES - MultipleSets.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(MultipleSets - ${HEADERS} - ${SOURCES} -) - -set_target_properties(MultipleSets PROPERTIES FOLDER "Samples") -target_link_libraries(MultipleSets PRIVATE utils) +vulkan_hpp__setup_sample_dynamic( NAME MultipleSets ) diff --git a/samples/MultipleSets/MultipleSets.cpp b/samples/MultipleSets/MultipleSets.cpp index 11ce4ec..415d8bf 100644 --- a/samples/MultipleSets/MultipleSets.cpp +++ b/samples/MultipleSets/MultipleSets.cpp @@ -29,7 +29,6 @@ #include "../utils/shaders.hpp" #include "../utils/utils.hpp" #include "SPIRV/GlslangToSpv.h" -#include "vulkan/vulkan.hpp" #include #include diff --git a/samples/OcclusionQuery/CMakeLists.txt b/samples/OcclusionQuery/CMakeLists.txt index 8c89a4e..bb23e02 100644 --- a/samples/OcclusionQuery/CMakeLists.txt +++ b/samples/OcclusionQuery/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(OcclusionQuery) - -set(HEADERS -) - -set(SOURCES - OcclusionQuery.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(OcclusionQuery - ${HEADERS} - ${SOURCES} -) - -set_target_properties(OcclusionQuery PROPERTIES FOLDER "Samples") -target_link_libraries(OcclusionQuery PRIVATE utils) +vulkan_hpp__setup_sample_dynamic( NAME OcclusionQuery ) diff --git a/samples/OcclusionQuery/OcclusionQuery.cpp b/samples/OcclusionQuery/OcclusionQuery.cpp index 79fc92d..d873a81 100644 --- a/samples/OcclusionQuery/OcclusionQuery.cpp +++ b/samples/OcclusionQuery/OcclusionQuery.cpp @@ -20,7 +20,6 @@ #include "../utils/shaders.hpp" #include "../utils/utils.hpp" #include "SPIRV/GlslangToSpv.h" -#include "vulkan/vulkan.hpp" #include #include diff --git a/samples/PhysicalDeviceExtensions/CMakeLists.txt b/samples/PhysicalDeviceExtensions/CMakeLists.txt index ca760d3..d34ca28 100644 --- a/samples/PhysicalDeviceExtensions/CMakeLists.txt +++ b/samples/PhysicalDeviceExtensions/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(PhysicalDeviceExtensions) - -set(HEADERS -) - -set(SOURCES - PhysicalDeviceExtensions.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(PhysicalDeviceExtensions - ${HEADERS} - ${SOURCES} -) - -set_target_properties(PhysicalDeviceExtensions PROPERTIES FOLDER "Samples") -target_link_libraries(PhysicalDeviceExtensions PRIVATE utils) +vulkan_hpp__setup_sample_dynamic( NAME PhysicalDeviceExtensions ) diff --git a/samples/PhysicalDeviceExtensions/PhysicalDeviceExtensions.cpp b/samples/PhysicalDeviceExtensions/PhysicalDeviceExtensions.cpp index 3c6e36a..87189c2 100644 --- a/samples/PhysicalDeviceExtensions/PhysicalDeviceExtensions.cpp +++ b/samples/PhysicalDeviceExtensions/PhysicalDeviceExtensions.cpp @@ -16,7 +16,6 @@ // Get extension properties per physical device. #include "../utils/utils.hpp" -#include "vulkan/vulkan.hpp" #include diff --git a/samples/PhysicalDeviceFeatures/CMakeLists.txt b/samples/PhysicalDeviceFeatures/CMakeLists.txt index f35d0df..9290b7e 100644 --- a/samples/PhysicalDeviceFeatures/CMakeLists.txt +++ b/samples/PhysicalDeviceFeatures/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(PhysicalDeviceFeatures) - -set(HEADERS -) - -set(SOURCES - PhysicalDeviceFeatures.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(PhysicalDeviceFeatures - ${HEADERS} - ${SOURCES} -) - -set_target_properties(PhysicalDeviceFeatures PROPERTIES FOLDER "Samples") -target_link_libraries(PhysicalDeviceFeatures PRIVATE utils) +vulkan_hpp__setup_sample_dynamic( NAME PhysicalDeviceFeatures ) diff --git a/samples/PhysicalDeviceFeatures/PhysicalDeviceFeatures.cpp b/samples/PhysicalDeviceFeatures/PhysicalDeviceFeatures.cpp index 9b84512..102db88 100644 --- a/samples/PhysicalDeviceFeatures/PhysicalDeviceFeatures.cpp +++ b/samples/PhysicalDeviceFeatures/PhysicalDeviceFeatures.cpp @@ -25,7 +25,6 @@ #endif #include "../utils/utils.hpp" -#include "vulkan/vulkan.hpp" #include diff --git a/samples/PhysicalDeviceGroups/CMakeLists.txt b/samples/PhysicalDeviceGroups/CMakeLists.txt index 127c715..998c72d 100644 --- a/samples/PhysicalDeviceGroups/CMakeLists.txt +++ b/samples/PhysicalDeviceGroups/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(PhysicalDeviceGroups) - -set(HEADERS -) - -set(SOURCES - PhysicalDeviceGroups.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(PhysicalDeviceGroups - ${HEADERS} - ${SOURCES} -) - -set_target_properties(PhysicalDeviceGroups PROPERTIES FOLDER "Samples") -target_link_libraries(PhysicalDeviceGroups PRIVATE utils) +vulkan_hpp__setup_sample_dynamic( NAME PhysicalDeviceGroups ) diff --git a/samples/PhysicalDeviceGroups/PhysicalDeviceGroups.cpp b/samples/PhysicalDeviceGroups/PhysicalDeviceGroups.cpp index 30f284c..edd794f 100644 --- a/samples/PhysicalDeviceGroups/PhysicalDeviceGroups.cpp +++ b/samples/PhysicalDeviceGroups/PhysicalDeviceGroups.cpp @@ -16,7 +16,6 @@ // Get the PhysicalDeviceGroups. #include "../utils/utils.hpp" -#include "vulkan/vulkan.hpp" #include diff --git a/samples/PhysicalDeviceMemoryProperties/CMakeLists.txt b/samples/PhysicalDeviceMemoryProperties/CMakeLists.txt index da07df4..c7d9887 100644 --- a/samples/PhysicalDeviceMemoryProperties/CMakeLists.txt +++ b/samples/PhysicalDeviceMemoryProperties/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(PhysicalDeviceMemoryProperties) - -set(HEADERS -) - -set(SOURCES - PhysicalDeviceMemoryProperties.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(PhysicalDeviceMemoryProperties - ${HEADERS} - ${SOURCES} -) - -set_target_properties(PhysicalDeviceMemoryProperties PROPERTIES FOLDER "Samples") -target_link_libraries(PhysicalDeviceMemoryProperties PRIVATE utils) +vulkan_hpp__setup_sample_dynamic( NAME PhysicalDeviceMemoryProperties ) diff --git a/samples/PhysicalDeviceMemoryProperties/PhysicalDeviceMemoryProperties.cpp b/samples/PhysicalDeviceMemoryProperties/PhysicalDeviceMemoryProperties.cpp index 4a32e77..62e500d 100644 --- a/samples/PhysicalDeviceMemoryProperties/PhysicalDeviceMemoryProperties.cpp +++ b/samples/PhysicalDeviceMemoryProperties/PhysicalDeviceMemoryProperties.cpp @@ -19,7 +19,6 @@ #include #include -#include #include static char const * AppName = "PhysicalDeviceMemoryProperties"; diff --git a/samples/PhysicalDeviceProperties/CMakeLists.txt b/samples/PhysicalDeviceProperties/CMakeLists.txt index 199f765..cde9159 100644 --- a/samples/PhysicalDeviceProperties/CMakeLists.txt +++ b/samples/PhysicalDeviceProperties/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(PhysicalDeviceProperties) - -set(HEADERS -) - -set(SOURCES - PhysicalDeviceProperties.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(PhysicalDeviceProperties - ${HEADERS} - ${SOURCES} -) - -set_target_properties(PhysicalDeviceProperties PROPERTIES FOLDER "Samples") -target_link_libraries(PhysicalDeviceProperties PRIVATE utils) +vulkan_hpp__setup_sample_dynamic( NAME PhysicalDeviceProperties ) diff --git a/samples/PhysicalDeviceProperties/PhysicalDeviceProperties.cpp b/samples/PhysicalDeviceProperties/PhysicalDeviceProperties.cpp index 5721b34..d38125f 100644 --- a/samples/PhysicalDeviceProperties/PhysicalDeviceProperties.cpp +++ b/samples/PhysicalDeviceProperties/PhysicalDeviceProperties.cpp @@ -20,7 +20,6 @@ #include #include #include -#include #include static char const * AppName = "PhysicalDeviceProperties"; diff --git a/samples/PhysicalDeviceQueueFamilyProperties/CMakeLists.txt b/samples/PhysicalDeviceQueueFamilyProperties/CMakeLists.txt index b63987b..3fbf332 100644 --- a/samples/PhysicalDeviceQueueFamilyProperties/CMakeLists.txt +++ b/samples/PhysicalDeviceQueueFamilyProperties/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(PhysicalDeviceQueueFamilyProperties) - -set(HEADERS -) - -set(SOURCES - PhysicalDeviceQueueFamilyProperties.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(PhysicalDeviceQueueFamilyProperties - ${HEADERS} - ${SOURCES} -) - -set_target_properties(PhysicalDeviceQueueFamilyProperties PROPERTIES FOLDER "Samples") -target_link_libraries(PhysicalDeviceQueueFamilyProperties PRIVATE utils) +vulkan_hpp__setup_sample_dynamic( NAME PhysicalDeviceQueueFamilyProperties ) diff --git a/samples/PhysicalDeviceQueueFamilyProperties/PhysicalDeviceQueueFamilyProperties.cpp b/samples/PhysicalDeviceQueueFamilyProperties/PhysicalDeviceQueueFamilyProperties.cpp index 0f87972..d4f9493 100644 --- a/samples/PhysicalDeviceQueueFamilyProperties/PhysicalDeviceQueueFamilyProperties.cpp +++ b/samples/PhysicalDeviceQueueFamilyProperties/PhysicalDeviceQueueFamilyProperties.cpp @@ -20,7 +20,6 @@ #include #include #include -#include #include static char const * AppName = "PhysicalDeviceQueueFamilyProperties"; diff --git a/samples/PipelineCache/CMakeLists.txt b/samples/PipelineCache/CMakeLists.txt index df70201..02db362 100644 --- a/samples/PipelineCache/CMakeLists.txt +++ b/samples/PipelineCache/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(PipelineCache) - -set(HEADERS -) - -set(SOURCES - PipelineCache.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(PipelineCache - ${HEADERS} - ${SOURCES} -) - -set_target_properties(PipelineCache PROPERTIES FOLDER "Samples") -target_link_libraries(PipelineCache PRIVATE utils) +vulkan_hpp__setup_sample_dynamic( NAME PipelineCache ) diff --git a/samples/PipelineCache/PipelineCache.cpp b/samples/PipelineCache/PipelineCache.cpp index dbd7d93..4e68696 100644 --- a/samples/PipelineCache/PipelineCache.cpp +++ b/samples/PipelineCache/PipelineCache.cpp @@ -23,12 +23,12 @@ #else // unknow compiler... just ignore the warnings for yourselves ;) #endif + #include "../utils/geometries.hpp" #include "../utils/math.hpp" #include "../utils/shaders.hpp" #include "../utils/utils.hpp" #include "SPIRV/GlslangToSpv.h" -#include "vulkan/vulkan.hpp" #include #include diff --git a/samples/PipelineDerivative/CMakeLists.txt b/samples/PipelineDerivative/CMakeLists.txt index fd2bba9..20dcd22 100644 --- a/samples/PipelineDerivative/CMakeLists.txt +++ b/samples/PipelineDerivative/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(PipelineDerivative) - -set(HEADERS -) - -set(SOURCES - PipelineDerivative.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(PipelineDerivative - ${HEADERS} - ${SOURCES} -) - -set_target_properties(PipelineDerivative PROPERTIES FOLDER "Samples") -target_link_libraries(PipelineDerivative PRIVATE utils) +vulkan_hpp__setup_sample_dynamic( NAME PipelineDerivative ) diff --git a/samples/PipelineDerivative/PipelineDerivative.cpp b/samples/PipelineDerivative/PipelineDerivative.cpp index 8abaf58..bde6479 100644 --- a/samples/PipelineDerivative/PipelineDerivative.cpp +++ b/samples/PipelineDerivative/PipelineDerivative.cpp @@ -29,7 +29,6 @@ #include "../utils/shaders.hpp" #include "../utils/utils.hpp" #include "SPIRV/GlslangToSpv.h" -#include "vulkan/vulkan.hpp" #include diff --git a/samples/PushConstants/CMakeLists.txt b/samples/PushConstants/CMakeLists.txt index 60ff0f8..133612b 100644 --- a/samples/PushConstants/CMakeLists.txt +++ b/samples/PushConstants/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(PushConstants) - -set(HEADERS -) - -set(SOURCES - PushConstants.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(PushConstants - ${HEADERS} - ${SOURCES} -) - -set_target_properties(PushConstants PROPERTIES FOLDER "Samples") -target_link_libraries(PushConstants PRIVATE utils) +vulkan_hpp__setup_sample_dynamic( NAME PushConstants ) diff --git a/samples/PushConstants/PushConstants.cpp b/samples/PushConstants/PushConstants.cpp index fc3e65d..3fd8430 100644 --- a/samples/PushConstants/PushConstants.cpp +++ b/samples/PushConstants/PushConstants.cpp @@ -23,12 +23,12 @@ #else // unknow compiler... just ignore the warnings for yourselves ;) #endif + #include "../utils/geometries.hpp" #include "../utils/math.hpp" #include "../utils/shaders.hpp" #include "../utils/utils.hpp" #include "SPIRV/GlslangToSpv.h" -#include "vulkan/vulkan.hpp" #include #include diff --git a/samples/PushDescriptors/CMakeLists.txt b/samples/PushDescriptors/CMakeLists.txt index 89a0149..12b4c8f 100644 --- a/samples/PushDescriptors/CMakeLists.txt +++ b/samples/PushDescriptors/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(PushDescriptors) - -set(HEADERS -) - -set(SOURCES - PushDescriptors.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(PushDescriptors - ${HEADERS} - ${SOURCES} -) - -set_target_properties(PushDescriptors PROPERTIES FOLDER "Samples") -target_link_libraries(PushDescriptors PRIVATE utils) +vulkan_hpp__setup_sample_dynamic( NAME PushDescriptors ) diff --git a/samples/PushDescriptors/PushDescriptors.cpp b/samples/PushDescriptors/PushDescriptors.cpp index dc7d837..e694907 100644 --- a/samples/PushDescriptors/PushDescriptors.cpp +++ b/samples/PushDescriptors/PushDescriptors.cpp @@ -20,7 +20,6 @@ #include "../utils/shaders.hpp" #include "../utils/utils.hpp" #include "SPIRV/GlslangToSpv.h" -#include "vulkan/vulkan.hpp" #include #include diff --git a/samples/RayTracing/CMakeLists.txt b/samples/RayTracing/CMakeLists.txt index 9770df2..3e81f4b 100644 --- a/samples/RayTracing/CMakeLists.txt +++ b/samples/RayTracing/CMakeLists.txt @@ -14,30 +14,15 @@ cmake_minimum_required(VERSION 3.2) -project(RayTracing) - -set(HEADERS - CameraManipulator.hpp -) - -set(SOURCES - CameraManipulator.cpp - RayTracing.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(RayTracing - ${HEADERS} - ${SOURCES} -) - -set_target_properties(RayTracing PROPERTIES FOLDER "Samples") -target_link_libraries(RayTracing PRIVATE utils) -target_include_directories(RayTracing PUBLIC - ${CMAKE_SOURCE_DIR}/samples/RayTracing/common - ${CMAKE_SOURCE_DIR}/samples/RayTracing/vulkannv - ${CMAKE_SOURCE_DIR}/stb - ${CMAKE_SOURCE_DIR}/tinyobjloader - ) +vulkan_hpp__setup_sample_dynamic( + NAME RayTracing + INCLUDE_DIRS + ${CMAKE_SOURCE_DIR}/samples/RayTracing/common + ${CMAKE_SOURCE_DIR}/samples/RayTracing/vulkannv + ${CMAKE_SOURCE_DIR}/stb + ${CMAKE_SOURCE_DIR}/tinyobjloader + HEADERS + CameraManipulator.hpp + SOURCES + CameraManipulator.cpp + RayTracing.cpp) diff --git a/samples/RayTracing/RayTracing.cpp b/samples/RayTracing/RayTracing.cpp index b3b1f6f..cce78f5 100644 --- a/samples/RayTracing/RayTracing.cpp +++ b/samples/RayTracing/RayTracing.cpp @@ -28,9 +28,9 @@ // unknow compiler... just ignore the warnings for yourselves ;) #endif -// clang-format off -// we need to include vulkan.hpp before glfw3.h, so stop clang-format to reorder them #include + +// clang-format off #include // clang-format on #include @@ -700,7 +700,25 @@ int main( int /*argc*/, char ** /*argv*/ ) vk::DebugUtilsMessengerEXT debugUtilsMessenger = instance.createDebugUtilsMessengerEXT( vk::su::makeDebugUtilsMessengerCreateInfoEXT() ); #endif - vk::PhysicalDevice physicalDevice = instance.enumeratePhysicalDevices().front(); + vk::PhysicalDevice physicalDevice = nullptr; + std::vector physicalDevices = instance.enumeratePhysicalDevices(); + for ( auto pd : physicalDevices ) + { + std::vector ep = pd.enumerateDeviceExtensionProperties(); + if ( std::find_if( ep.cbegin(), + ep.cend(), + []( vk::ExtensionProperties const & prop ) + { return strcmp( prop.extensionName, VK_NV_RAY_TRACING_EXTENSION_NAME ) == 0; } ) != ep.cend() ) + { + physicalDevice = pd; + break; + } + } + if ( !physicalDevice ) + { + std::cerr << AppName << ": can't find a PhysicalDevice supporting extension <" << VK_NV_RAY_TRACING_EXTENSION_NAME << ">" << std::endl; + return 1; + } // Create Window Surface (using glfw) vk::SurfaceKHR surface; diff --git a/samples/SecondaryCommandBuffer/CMakeLists.txt b/samples/SecondaryCommandBuffer/CMakeLists.txt index dcaea04..c7626b5 100644 --- a/samples/SecondaryCommandBuffer/CMakeLists.txt +++ b/samples/SecondaryCommandBuffer/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(SecondaryCommandBuffer) - -set(HEADERS -) - -set(SOURCES - SecondaryCommandBuffer.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(SecondaryCommandBuffer - ${HEADERS} - ${SOURCES} -) - -set_target_properties(SecondaryCommandBuffer PROPERTIES FOLDER "Samples") -target_link_libraries(SecondaryCommandBuffer PRIVATE utils) +vulkan_hpp__setup_sample_dynamic( NAME SecondaryCommandBuffer ) diff --git a/samples/SecondaryCommandBuffer/SecondaryCommandBuffer.cpp b/samples/SecondaryCommandBuffer/SecondaryCommandBuffer.cpp index d144fe2..69a8fbb 100644 --- a/samples/SecondaryCommandBuffer/SecondaryCommandBuffer.cpp +++ b/samples/SecondaryCommandBuffer/SecondaryCommandBuffer.cpp @@ -30,7 +30,6 @@ #include "../utils/shaders.hpp" #include "../utils/utils.hpp" #include "SPIRV/GlslangToSpv.h" -#include "vulkan/vulkan.hpp" #include #include diff --git a/samples/SeparateImageSampler/CMakeLists.txt b/samples/SeparateImageSampler/CMakeLists.txt index b70993d..09ca748 100644 --- a/samples/SeparateImageSampler/CMakeLists.txt +++ b/samples/SeparateImageSampler/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(SeparateImageSampler) - -set(HEADERS -) - -set(SOURCES - SeparateImageSampler.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(SeparateImageSampler - ${HEADERS} - ${SOURCES} -) - -set_target_properties(SeparateImageSampler PROPERTIES FOLDER "Samples") -target_link_libraries(SeparateImageSampler PRIVATE utils) +vulkan_hpp__setup_sample_dynamic( NAME SeparateImageSampler ) diff --git a/samples/SeparateImageSampler/SeparateImageSampler.cpp b/samples/SeparateImageSampler/SeparateImageSampler.cpp index 13767b3..dff6e23 100644 --- a/samples/SeparateImageSampler/SeparateImageSampler.cpp +++ b/samples/SeparateImageSampler/SeparateImageSampler.cpp @@ -29,7 +29,6 @@ #include "../utils/shaders.hpp" #include "../utils/utils.hpp" #include "SPIRV/GlslangToSpv.h" -#include "vulkan/vulkan.hpp" #include #include diff --git a/samples/SurfaceCapabilities/CMakeLists.txt b/samples/SurfaceCapabilities/CMakeLists.txt index 1322e19..d68b160 100644 --- a/samples/SurfaceCapabilities/CMakeLists.txt +++ b/samples/SurfaceCapabilities/CMakeLists.txt @@ -14,26 +14,9 @@ cmake_minimum_required(VERSION 3.2) -project(SurfaceCapabilities) - -set(HEADERS -) - -set(SOURCES - SurfaceCapabilities.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - # Win32 exclusive vk::SurfaceCapabilitiesFullScreenExclusiveEXT is used if(WIN32) - add_executable(SurfaceCapabilities - ${HEADERS} - ${SOURCES} - ) - set_target_properties(SurfaceCapabilities PROPERTIES FOLDER "Samples") - target_link_libraries(SurfaceCapabilities PRIVATE utils) + vulkan_hpp__setup_sample_dynamic( NAME SurfaceCapabilities ) endif() diff --git a/samples/SurfaceCapabilities/SurfaceCapabilities.cpp b/samples/SurfaceCapabilities/SurfaceCapabilities.cpp index afd7ab2..38e91de 100644 --- a/samples/SurfaceCapabilities/SurfaceCapabilities.cpp +++ b/samples/SurfaceCapabilities/SurfaceCapabilities.cpp @@ -20,7 +20,6 @@ #include #include #include -#include #include static char const * AppName = "SurfaceCapabilities"; diff --git a/samples/SurfaceFormats/CMakeLists.txt b/samples/SurfaceFormats/CMakeLists.txt index a6630bb..a51509e 100644 --- a/samples/SurfaceFormats/CMakeLists.txt +++ b/samples/SurfaceFormats/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(SurfaceFormats) - -set(HEADERS -) - -set(SOURCES - SurfaceFormats.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(SurfaceFormats - ${HEADERS} - ${SOURCES} -) - -set_target_properties(SurfaceFormats PROPERTIES FOLDER "Samples") -target_link_libraries(SurfaceFormats PRIVATE utils) +vulkan_hpp__setup_sample_dynamic( NAME SurfaceFormats ) diff --git a/samples/SurfaceFormats/SurfaceFormats.cpp b/samples/SurfaceFormats/SurfaceFormats.cpp index 399046c..e2a4775 100644 --- a/samples/SurfaceFormats/SurfaceFormats.cpp +++ b/samples/SurfaceFormats/SurfaceFormats.cpp @@ -20,7 +20,6 @@ #include #include #include -#include #include static char const * AppName = "SurfaceFormats"; diff --git a/samples/Template/CMakeLists.txt b/samples/Template/CMakeLists.txt index e1d1297..b110b17 100644 --- a/samples/Template/CMakeLists.txt +++ b/samples/Template/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(Template) - -set(HEADERS -) - -set(SOURCES - Template.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(Template - ${HEADERS} - ${SOURCES} -) - -set_target_properties(Template PROPERTIES FOLDER "Samples") -target_link_libraries(Template PRIVATE utils) +vulkan_hpp__setup_sample_dynamic( NAME Template ) diff --git a/samples/Template/Template.cpp b/samples/Template/Template.cpp index b29d5ee..d44a3d4 100644 --- a/samples/Template/Template.cpp +++ b/samples/Template/Template.cpp @@ -20,7 +20,6 @@ #include "../utils/shaders.hpp" #include "../utils/utils.hpp" #include "SPIRV/GlslangToSpv.h" -#include "vulkan/vulkan.hpp" #include #include diff --git a/samples/TexelBuffer/CMakeLists.txt b/samples/TexelBuffer/CMakeLists.txt index 8168e42..8672dab 100644 --- a/samples/TexelBuffer/CMakeLists.txt +++ b/samples/TexelBuffer/CMakeLists.txt @@ -14,22 +14,4 @@ cmake_minimum_required(VERSION 3.2) -project(TexelBuffer) - -set(HEADERS -) - -set(SOURCES - TexelBuffer.cpp -) - -source_group(headers FILES ${HEADERS}) -source_group(sources FILES ${SOURCES}) - -add_executable(TexelBuffer - ${HEADERS} - ${SOURCES} -) - -set_target_properties(TexelBuffer PROPERTIES FOLDER "Samples") -target_link_libraries(TexelBuffer PRIVATE utils) +vulkan_hpp__setup_sample_dynamic( NAME TexelBuffer ) diff --git a/samples/TexelBuffer/TexelBuffer.cpp b/samples/TexelBuffer/TexelBuffer.cpp index 2c6ee78..04067ee 100644 --- a/samples/TexelBuffer/TexelBuffer.cpp +++ b/samples/TexelBuffer/TexelBuffer.cpp @@ -20,7 +20,6 @@ #include "../utils/shaders.hpp" #include "../utils/utils.hpp" #include "SPIRV/GlslangToSpv.h" -#include "vulkan/vulkan.hpp" #include #include diff --git a/samples/utils/CMakeLists.txt b/samples/utils/CMakeLists.txt index ed4d5ec..9d01171 100644 --- a/samples/utils/CMakeLists.txt +++ b/samples/utils/CMakeLists.txt @@ -47,3 +47,4 @@ target_link_libraries(utils PUBLIC glslang-default-resource-limits) target_link_libraries(utils PUBLIC SPIRV) target_compile_definitions(utils PUBLIC VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=1) +target_precompile_headers(utils PRIVATE ) diff --git a/samples/utils/shaders.cpp b/samples/utils/shaders.cpp index db1a9df..879b054 100644 --- a/samples/utils/shaders.cpp +++ b/samples/utils/shaders.cpp @@ -17,7 +17,8 @@ #include "SPIRV/GlslangToSpv.h" #include "StandAlone/ResourceLimits.h" -#include "vulkan/vulkan.hpp" + +#include namespace vk { diff --git a/samples/utils/shaders.hpp b/samples/utils/shaders.hpp index c926928..5989435 100644 --- a/samples/utils/shaders.hpp +++ b/samples/utils/shaders.hpp @@ -13,10 +13,9 @@ // limitations under the License. // -#include "vulkan/vulkan.hpp" - #include #include +#include namespace vk { diff --git a/samples/utils/utils.hpp b/samples/utils/utils.hpp index 8392b9f..70e58d0 100644 --- a/samples/utils/utils.hpp +++ b/samples/utils/utils.hpp @@ -15,14 +15,14 @@ // limitations under the License. // -#include "vulkan/vulkan.hpp" +#include #define GLFW_INCLUDE_NONE #include #include #include #include -#include // std::unique_ptr +#include // std::unique_ptr namespace vk { diff --git a/tests/ArrayProxy/ArrayProxy.cpp b/tests/ArrayProxy/ArrayProxy.cpp index 1650d6f..23f1588 100644 --- a/tests/ArrayProxy/ArrayProxy.cpp +++ b/tests/ArrayProxy/ArrayProxy.cpp @@ -15,9 +15,8 @@ // VulkanHpp Samples : ArrayProxy // Compile test on using vk::ArrayProxy -#include "vulkan/vulkan.hpp" - #include +#include #if ( 20 <= VULKAN_HPP_CPP_VERSION ) # include #endif diff --git a/tests/ArrayProxyNoTemporaries/ArrayProxyNoTemporaries.cpp b/tests/ArrayProxyNoTemporaries/ArrayProxyNoTemporaries.cpp index 26b3900..cbc7666 100644 --- a/tests/ArrayProxyNoTemporaries/ArrayProxyNoTemporaries.cpp +++ b/tests/ArrayProxyNoTemporaries/ArrayProxyNoTemporaries.cpp @@ -25,9 +25,8 @@ // unknow compiler... just ignore the warnings for yourselves ;) #endif -#include "vulkan/vulkan.hpp" - #include +#include void fct( vk::ArrayProxyNoTemporaries /*ap*/ ) {} @@ -270,7 +269,7 @@ int main( int /*argc*/, char ** /*argv*/ ) vk::ArrayProxyNoTemporaries ap24 = {}; assert( ap24.size() == 0 ); - //vk::ArrayProxyNoTemporaries ap25 = { 0, 1 }; // not supported + // vk::ArrayProxyNoTemporaries ap25 = { 0, 1 }; // not supported vk::ArrayProxyNoTemporaries ap26 = il1; assert( ap26.size() == 2 ); diff --git a/tests/DesignatedInitializers/DesignatedInitializers.cpp b/tests/DesignatedInitializers/DesignatedInitializers.cpp index e4222ba..a506b29 100644 --- a/tests/DesignatedInitializers/DesignatedInitializers.cpp +++ b/tests/DesignatedInitializers/DesignatedInitializers.cpp @@ -17,9 +17,8 @@ #define VULKAN_HPP_NO_STRUCT_CONSTRUCTORS -#include "vulkan/vulkan.hpp" - #include +#include #if defined( __clang__ ) || defined( __GNUC__ ) # pragma GCC diagnostic ignored "-Wunused-variable" diff --git a/tests/DeviceFunctions/CMakeLists.txt b/tests/DeviceFunctions/CMakeLists.txt index b411958..4571bcf 100644 --- a/tests/DeviceFunctions/CMakeLists.txt +++ b/tests/DeviceFunctions/CMakeLists.txt @@ -36,5 +36,5 @@ if (NOT TESTS_BUILD_ONLY_DYNAMIC) ) set_target_properties(DeviceFunctions PROPERTIES FOLDER "Tests") - target_link_libraries(DeviceFunctions PRIVATE utils "${Vulkan_LIBRARIES}") + target_link_libraries(DeviceFunctions PRIVATE utils ${Vulkan_LIBRARIES}) endif() \ No newline at end of file diff --git a/tests/DeviceFunctions/DeviceFunctions.cpp b/tests/DeviceFunctions/DeviceFunctions.cpp index 650a2c2..1df77ee 100644 --- a/tests/DeviceFunctions/DeviceFunctions.cpp +++ b/tests/DeviceFunctions/DeviceFunctions.cpp @@ -27,9 +27,8 @@ #undef VULKAN_HPP_DISPATCH_LOADER_DYNAMIC #define VULKAN_HPP_DISPATCH_LOADER_DYNAMIC 0 -#include "vulkan/vulkan.hpp" - #include +#include static char const * AppName = "DeviceFunctions"; static char const * EngineName = "Vulkan.hpp"; diff --git a/tests/DispatchLoaderDynamic/DispatchLoaderDynamic.cpp b/tests/DispatchLoaderDynamic/DispatchLoaderDynamic.cpp index 3848c3d..39257fc 100644 --- a/tests/DispatchLoaderDynamic/DispatchLoaderDynamic.cpp +++ b/tests/DispatchLoaderDynamic/DispatchLoaderDynamic.cpp @@ -17,11 +17,9 @@ #define VULKAN_HPP_DISPATCH_LOADER_DYNAMIC 1 -#include "vulkan/vulkan.hpp" - #include #include -#include +#include VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE diff --git a/tests/DispatchLoaderDynamicSharedLibrary/DispatchLoaderDynamicSharedLibrary.cpp b/tests/DispatchLoaderDynamicSharedLibrary/DispatchLoaderDynamicSharedLibrary.cpp index 3580750..76b7c7e 100644 --- a/tests/DispatchLoaderDynamicSharedLibrary/DispatchLoaderDynamicSharedLibrary.cpp +++ b/tests/DispatchLoaderDynamicSharedLibrary/DispatchLoaderDynamicSharedLibrary.cpp @@ -15,6 +15,6 @@ // VulkanHpp Samples : DispatchLoaderDynamic // Compile test on DispatchLoaderDynamic functions -#include "vulkan/vulkan.hpp" +#include VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE diff --git a/tests/DispatchLoaderDynamicSharedLibraryClient/DispatchLoaderDynamicSharedLibraryClient.cpp b/tests/DispatchLoaderDynamicSharedLibraryClient/DispatchLoaderDynamicSharedLibraryClient.cpp index 2f7cc95..b0e9c27 100644 --- a/tests/DispatchLoaderDynamicSharedLibraryClient/DispatchLoaderDynamicSharedLibraryClient.cpp +++ b/tests/DispatchLoaderDynamicSharedLibraryClient/DispatchLoaderDynamicSharedLibraryClient.cpp @@ -15,11 +15,9 @@ // VulkanHpp Samples : DispatchLoaderDynamic // Compile test on DispatchLoaderDynamic functions -#include "vulkan/vulkan.hpp" - #include #include -#include +#include int main( int /*argc*/, char ** /*argv*/ ) { diff --git a/tests/DispatchLoaderStatic/CMakeLists.txt b/tests/DispatchLoaderStatic/CMakeLists.txt index 622b259..1cff859 100644 --- a/tests/DispatchLoaderStatic/CMakeLists.txt +++ b/tests/DispatchLoaderStatic/CMakeLists.txt @@ -40,6 +40,6 @@ if (NOT TESTS_BUILD_ONLY_DYNAMIC) endif() set_target_properties(DispatchLoaderStatic PROPERTIES FOLDER "Tests") - target_link_libraries(DispatchLoaderStatic PRIVATE utils "${Vulkan_LIBRARIES}") + target_link_libraries(DispatchLoaderStatic PRIVATE utils ${Vulkan_LIBRARIES}) endif() \ No newline at end of file diff --git a/tests/DispatchLoaderStatic/DispatchLoaderStatic.cpp b/tests/DispatchLoaderStatic/DispatchLoaderStatic.cpp index f1856bd..2ad158d 100644 --- a/tests/DispatchLoaderStatic/DispatchLoaderStatic.cpp +++ b/tests/DispatchLoaderStatic/DispatchLoaderStatic.cpp @@ -18,10 +18,9 @@ #undef VULKAN_HPP_DISPATCH_LOADER_DYNAMIC #define VULKAN_HPP_DISPATCH_LOADER_DYNAMIC 0 -#include "vulkan/vulkan.hpp" - #include #include +#include int main( int /*argc*/, char ** /*argv*/ ) { diff --git a/tests/NoExceptions/NoExceptions.cpp b/tests/NoExceptions/NoExceptions.cpp index e286c6a..6c9eeb6 100644 --- a/tests/NoExceptions/NoExceptions.cpp +++ b/tests/NoExceptions/NoExceptions.cpp @@ -19,9 +19,8 @@ #define VULKAN_HPP_NO_EXCEPTIONS #define VULKAN_HPP_DISPATCH_LOADER_DYNAMIC 1 -#include "vulkan/vulkan.hpp" - #include +#include static char const * AppName = "NoExceptions"; static char const * EngineName = "Vulkan.hpp"; diff --git a/tests/StructureChain/StructureChain.cpp b/tests/StructureChain/StructureChain.cpp index f806a99..86b7639 100644 --- a/tests/StructureChain/StructureChain.cpp +++ b/tests/StructureChain/StructureChain.cpp @@ -26,9 +26,8 @@ #define VULKAN_HPP_DISPATCH_LOADER_DYNAMIC 1 -#include "vulkan/vulkan.hpp" - #include +#include static char const * AppName = "StructureChain"; static char const * EngineName = "Vulkan.hpp"; @@ -37,7 +36,8 @@ VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE template void unused( T const & ) -{} +{ +} int main( int /*argc*/, char ** /*argv*/ ) { diff --git a/tests/UniqueHandle/UniqueHandle.cpp b/tests/UniqueHandle/UniqueHandle.cpp index 5c7b8bc..5179212 100644 --- a/tests/UniqueHandle/UniqueHandle.cpp +++ b/tests/UniqueHandle/UniqueHandle.cpp @@ -18,7 +18,6 @@ #include "../../samples/utils/shaders.hpp" #include "../../samples/utils/utils.hpp" #include "SPIRV/GlslangToSpv.h" -#include "vulkan/vulkan.hpp" #include diff --git a/tests/UniqueHandleDefaultArguments/UniqueHandleDefaultArguments.cpp b/tests/UniqueHandleDefaultArguments/UniqueHandleDefaultArguments.cpp index 2a7aaf3..3cb3132 100644 --- a/tests/UniqueHandleDefaultArguments/UniqueHandleDefaultArguments.cpp +++ b/tests/UniqueHandleDefaultArguments/UniqueHandleDefaultArguments.cpp @@ -17,7 +17,7 @@ #define VULKAN_HPP_NO_EXCEPTIONS #define VULKAN_HPP_DISPATCH_LOADER_DYNAMIC 1 -#include "vulkan/vulkan.hpp" +#include VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE diff --git a/vulkan/vulkan_raii.hpp b/vulkan/vulkan_raii.hpp index aaef17a..2eca168 100644 --- a/vulkan/vulkan_raii.hpp +++ b/vulkan/vulkan_raii.hpp @@ -8,6 +8,7 @@ #ifndef VULKAN_RAII_HPP #define VULKAN_RAII_HPP +#include #include #if !defined( VULKAN_HPP_RAII_NAMESPACE )