Cleanup in CMakeLists.txt (#1572)
authorAndreas Süßenbach <asuessenbach@nvidia.com>
Mon, 8 May 2023 09:54:57 +0000 (11:54 +0200)
committerGitHub <noreply@github.com>
Mon, 8 May 2023 09:54:57 +0000 (11:54 +0200)
123 files changed:
CMakeLists.txt
RAII_Samples/01_InitInstance/CMakeLists.txt
RAII_Samples/02_EnumerateDevices/CMakeLists.txt
RAII_Samples/03_InitDevice/CMakeLists.txt
RAII_Samples/04_InitCommandBuffer/CMakeLists.txt
RAII_Samples/05_InitSwapchain/CMakeLists.txt
RAII_Samples/06_InitDepthBuffer/CMakeLists.txt
RAII_Samples/07_InitUniformBuffer/CMakeLists.txt
RAII_Samples/08_InitPipelineLayout/CMakeLists.txt
RAII_Samples/09_InitDescriptorSet/CMakeLists.txt
RAII_Samples/10_InitRenderPass/CMakeLists.txt
RAII_Samples/11_InitShaders/CMakeLists.txt
RAII_Samples/12_InitFrameBuffers/CMakeLists.txt
RAII_Samples/13_InitVertexBuffer/CMakeLists.txt
RAII_Samples/14_InitPipeline/CMakeLists.txt
RAII_Samples/15_DrawCube/CMakeLists.txt
RAII_Samples/16_Vulkan_1_1/CMakeLists.txt
RAII_Samples/CMakeLists.txt
RAII_Samples/CopyBlitImage/CMakeLists.txt
RAII_Samples/CreateDebugUtilsMessenger/CMakeLists.txt
RAII_Samples/DebugUtilsObjectName/CMakeLists.txt
RAII_Samples/DrawTexturedCube/CMakeLists.txt
RAII_Samples/DynamicUniform/CMakeLists.txt
RAII_Samples/EnableValidationWithCallback/CMakeLists.txt
RAII_Samples/EnumerateDevicesAdvanced/CMakeLists.txt
RAII_Samples/Events/CMakeLists.txt
RAII_Samples/ImmutableSampler/CMakeLists.txt
RAII_Samples/InitTexture/CMakeLists.txt
RAII_Samples/InputAttachment/CMakeLists.txt
RAII_Samples/InstanceExtensionProperties/CMakeLists.txt
RAII_Samples/InstanceLayerExtensionProperties/CMakeLists.txt
RAII_Samples/InstanceLayerProperties/CMakeLists.txt
RAII_Samples/InstanceVersion/CMakeLists.txt
RAII_Samples/MultipleSets/CMakeLists.txt
RAII_Samples/OcclusionQuery/CMakeLists.txt
RAII_Samples/PhysicalDeviceExtensions/CMakeLists.txt
RAII_Samples/PhysicalDeviceFeatures/CMakeLists.txt
RAII_Samples/PhysicalDeviceGroups/CMakeLists.txt
RAII_Samples/PhysicalDeviceMemoryProperties/CMakeLists.txt
RAII_Samples/PhysicalDeviceProperties/CMakeLists.txt
RAII_Samples/PhysicalDeviceQueueFamilyProperties/CMakeLists.txt
RAII_Samples/PipelineCache/CMakeLists.txt
RAII_Samples/PipelineDerivative/CMakeLists.txt
RAII_Samples/PushConstants/CMakeLists.txt
RAII_Samples/PushDescriptors/CMakeLists.txt
RAII_Samples/RayTracing/CMakeLists.txt
RAII_Samples/SecondaryCommandBuffer/CMakeLists.txt
RAII_Samples/SeparateImageSampler/CMakeLists.txt
RAII_Samples/SurfaceCapabilities/CMakeLists.txt
RAII_Samples/SurfaceFormats/CMakeLists.txt
RAII_Samples/Template/CMakeLists.txt
RAII_Samples/TexelBuffer/CMakeLists.txt
RAII_Samples/utils/CMakeLists.txt
samples/01_InitInstance/CMakeLists.txt
samples/02_EnumerateDevices/CMakeLists.txt
samples/03_InitDevice/CMakeLists.txt
samples/04_InitCommandBuffer/CMakeLists.txt
samples/05_InitSwapchain/CMakeLists.txt
samples/06_InitDepthBuffer/CMakeLists.txt
samples/07_InitUniformBuffer/CMakeLists.txt
samples/08_InitPipelineLayout/CMakeLists.txt
samples/09_InitDescriptorSet/CMakeLists.txt
samples/10_InitRenderPass/CMakeLists.txt
samples/11_InitShaders/CMakeLists.txt
samples/12_InitFrameBuffers/CMakeLists.txt
samples/13_InitVertexBuffer/CMakeLists.txt
samples/14_InitPipeline/CMakeLists.txt
samples/15_DrawCube/CMakeLists.txt
samples/16_Vulkan_1_1/CMakeLists.txt
samples/CMakeLists.txt
samples/CopyBlitImage/CMakeLists.txt
samples/CreateDebugUtilsMessenger/CMakeLists.txt
samples/DebugUtilsObjectName/CMakeLists.txt
samples/DrawTexturedCube/CMakeLists.txt
samples/DynamicUniform/CMakeLists.txt
samples/EnableValidationWithCallback/CMakeLists.txt
samples/EnumerateDevicesAdvanced/CMakeLists.txt
samples/Events/CMakeLists.txt
samples/ImmutableSampler/CMakeLists.txt
samples/InitTexture/CMakeLists.txt
samples/InputAttachment/CMakeLists.txt
samples/InstanceExtensionProperties/CMakeLists.txt
samples/InstanceLayerExtensionProperties/CMakeLists.txt
samples/InstanceLayerProperties/CMakeLists.txt
samples/InstanceVersion/CMakeLists.txt
samples/MultipleSets/CMakeLists.txt
samples/OcclusionQuery/CMakeLists.txt
samples/PhysicalDeviceExtensions/CMakeLists.txt
samples/PhysicalDeviceFeatures/CMakeLists.txt
samples/PhysicalDeviceGroups/CMakeLists.txt
samples/PhysicalDeviceMemoryProperties/CMakeLists.txt
samples/PhysicalDeviceProperties/CMakeLists.txt
samples/PhysicalDeviceQueueFamilyProperties/CMakeLists.txt
samples/PipelineCache/CMakeLists.txt
samples/PipelineDerivative/CMakeLists.txt
samples/PushConstants/CMakeLists.txt
samples/PushDescriptors/CMakeLists.txt
samples/RayTracing/CMakeLists.txt
samples/SecondaryCommandBuffer/CMakeLists.txt
samples/SeparateImageSampler/CMakeLists.txt
samples/SurfaceCapabilities/CMakeLists.txt
samples/SurfaceFormats/CMakeLists.txt
samples/Template/CMakeLists.txt
samples/TexelBuffer/CMakeLists.txt
samples/utils/CMakeLists.txt
tests/ArrayProxy/CMakeLists.txt
tests/ArrayProxyNoTemporaries/CMakeLists.txt
tests/CMakeLists.txt
tests/DesignatedInitializers/CMakeLists.txt
tests/DeviceFunctions/CMakeLists.txt
tests/DispatchLoaderDynamic/CMakeLists.txt
tests/DispatchLoaderDynamicSharedLibrary/CMakeLists.txt
tests/DispatchLoaderDynamicSharedLibraryClient/CMakeLists.txt
tests/DispatchLoaderStatic/CMakeLists.txt
tests/ExtensionInspection/CMakeLists.txt
tests/Flags/CMakeLists.txt
tests/FormatTraits/CMakeLists.txt
tests/Hash/CMakeLists.txt
tests/NoExceptions/CMakeLists.txt
tests/StridedArrayProxy/CMakeLists.txt
tests/StructureChain/CMakeLists.txt
tests/UniqueHandle/CMakeLists.txt
tests/UniqueHandleDefaultArguments/CMakeLists.txt

index 248c2c9..c0f0d8e 100644 (file)
@@ -43,6 +43,36 @@ function( vulkan_hpp__setup_platform )
        endif()
 endfunction()
 
+function( vulkan_hpp__setup_vulkan_include )
+       set( options )
+       set( oneValueArgs NAME )
+       set( multiValueArgs )
+       cmake_parse_arguments( TARGET "{options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
+       
+       if( VULKAN_HPP_SAMPLES_BUILD_WITH_LOCAL_VULKAN_HPP )
+               target_include_directories( ${TARGET_NAME} PUBLIC "${CMAKE_SOURCE_DIR}" )
+               target_include_directories( ${TARGET_NAME} PUBLIC "${CMAKE_SOURCE_DIR}/Vulkan-Headers/include" )
+       else()
+               target_include_directories( ${TARGET_NAME} PUBLIC "${Vulkan_INCLUDE_DIRS}" )
+       endif()
+endfunction()
+
+function( vulkan_hpp__setup_warning_level )
+       set( options )
+       set( oneValueArgs NAME )
+       set( multiValueArgs )
+       cmake_parse_arguments( TARGET "{options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
+       
+       if( MSVC )
+               target_compile_options(${TARGET_NAME} PRIVATE /W4 /WX )
+               if( MSVC_VER GREATER_EQUAL 1910 )
+                       target_compile_options( ${TARGET_NAME} PRIVATE /permissive- )
+               endif()
+       else()
+               target_compile_options( ${TARGET_NAME} PRIVATE -Wall -Wextra -pedantic -Werror )
+       endif()
+endfunction()
+
 function( vulkan_hpp__setup_project )
        set( options )
        set( oneValueArgs NAME )
@@ -54,7 +84,7 @@ endfunction()
 
 function( vulkan_hpp__setup_library )
        set( options SHARED )
-       set( oneValueArgs NAME )
+       set( oneValueArgs FOLDER NAME )
        set( multiValueArgs HEADERS SOURCES )
        cmake_parse_arguments( TARGET "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
        
@@ -69,9 +99,12 @@ function( vulkan_hpp__setup_library )
                        add_library( ${TARGET_NAME} ${TARGET_SOURCES} ${TARGET_HEADERS} )
                endif()
                vulkan_hpp__setup_platform( NAME ${TARGET_NAME} )
-               set_target_properties( ${TARGET_NAME} PROPERTIES CXX_STANDARD 11 CXX_STANDARD_REQUIRED ON )
-               target_include_directories( ${TARGET_NAME} PUBLIC ${VulkanHeaders_INCLUDE_DIR} )        
+               vulkan_hpp__setup_vulkan_include( NAME ${TARGET_NAME} )
+               vulkan_hpp__setup_warning_level( NAME ${TARGET_NAME} )
+               set_target_properties( ${TARGET_NAME} PROPERTIES CXX_STANDARD 11 )
+               set_target_properties( ${TARGET_NAME} PROPERTIES CXX_STANDARD_REQUIRED ON )
        endif()
+       set_target_properties( ${TARGET_NAME} PROPERTIES FOLDER ${TARGET_FOLDER} )
 endfunction()
 
 function( vulkan_hpp__setup_sample )
@@ -80,11 +113,17 @@ function( vulkan_hpp__setup_sample )
        set( multiValueArgs HEADERS INCLUDE_DIRS LIBS PCH SOURCES )
        cmake_parse_arguments( TARGET "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
 
+       if( NOT (VULKAN_HPP_SAMPLES_BUILD_ONLY_DYNAMIC AND VULKAN_HPP_SAMPLES_BUILD_WITH_LOCAL_VULKAN_HPP) )
+               find_package( Vulkan REQUIRED )
+       endif()
+
        vulkan_hpp__setup_project( NAME ${TARGET_NAME} )
 
        add_executable( ${TARGET_NAME} ${TARGET_HEADERS} ${TARGET_SOURCES} )
        
        vulkan_hpp__setup_platform( NAME ${TARGET_NAME} )
+       vulkan_hpp__setup_vulkan_include( NAME ${TARGET_NAME} )
+       vulkan_hpp__setup_warning_level( NAME ${TARGET_NAME} )
 
        set_target_properties( ${TARGET_NAME} PROPERTIES CXX_STANDARD 11 CXX_STANDARD_REQUIRED ON )
 
@@ -92,7 +131,6 @@ function( vulkan_hpp__setup_sample )
                set_target_properties( ${TARGET_NAME} PROPERTIES FOLDER "${TARGET_FOLDER}" )
        endif()
        
-       target_include_directories( ${TARGET_NAME} PUBLIC ${VulkanHeaders_INCLUDE_DIR} )
        if( TARGET_INCLUDE_DIRS )
                target_include_directories( ${TARGET_NAME} PUBLIC ${TARGET_INCLUDE_DIRS} )
        endif()
@@ -116,7 +154,7 @@ function( vulkan_hpp__setup_sample_static )
        set( multiValueArgs )
        cmake_parse_arguments( TARGET "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
 
-       if( NOT SAMPLES_BUILD_ONLY_DYNAMIC )
+       if( NOT VULKAN_HPP_SAMPLES_BUILD_ONLY_DYNAMIC )
                if( NOT TARGET_NAME )
                        message( FATAL_ERROR "NAME must be defined in vulkan_hpp__setup_sample_static" )
                endif()
@@ -183,9 +221,13 @@ endfunction()
 function( vulkan_hpp__setup_test )
        set( options )
        set( oneValueArgs CXX_STANDARD NAME )
-       set( multiValueArgs )
+       set( multiValueArgs LIBRARIES )
        cmake_parse_arguments( TARGET "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
 
+       if( NOT (VULKAN_HPP_TESTS_BUILD_ONLY_DYNAMIC AND VULKAN_HPP_TESTS_BUILD_WITH_LOCAL_VULKAN_HPP) )
+               find_package( Vulkan REQUIRED )
+       endif()
+
        if( NOT TARGET_NAME )
                message( FATAL_ERROR "NAME must be defined in vulkan_hpp__setup_test" )
        endif()
@@ -198,9 +240,13 @@ function( vulkan_hpp__setup_test )
        add_executable( ${TARGET_NAME} ${TARGET_NAME}.cpp )
        
        vulkan_hpp__setup_platform( NAME ${TARGET_NAME} )
+       vulkan_hpp__setup_vulkan_include( NAME ${TARGET_NAME} )
+       vulkan_hpp__setup_warning_level( NAME ${TARGET_NAME} )
 
-       set_target_properties( ${TARGET_NAME} PROPERTIES CXX_STANDARD ${TARGET_CXX_STANDARD} CXX_STANDARD_REQUIRED ON )
+       set_target_properties( ${TARGET_NAME} PROPERTIES CXX_STANDARD ${TARGET_CXX_STANDARD} CXX_STANDARD_REQUIRED ON FOLDER "Tests" )
        target_include_directories( ${TARGET_NAME} PUBLIC ${VulkanHeaders_INCLUDE_DIR} )
+       target_include_directories( ${TARGET_NAME} PUBLIC "${CMAKE_SOURCE_DIR}/glm" )
+       target_link_libraries( ${TARGET_NAME} PRIVATE utils ${TARGET_LIBRARIES} )
 endfunction()
 
 set_property( GLOBAL PROPERTY USE_FOLDERS ON )
@@ -248,6 +294,10 @@ option( VULKAN_HPP_PRECOMPILE "Precompile vulkan.hpp and vulkan_raii.hpp for sam
 option( VULKAN_HPP_RUN_GENERATOR "Run the HPP generator" OFF )
 option( VULKAN_HPP_SAMPLES_BUILD "Build samples" OFF )
 option( VULKAN_HPP_TESTS_BUILD "Build tests" OFF )
+option( VULKAN_HPP_SAMPLES_BUILD_WITH_LOCAL_VULKAN_HPP "Build with local Vulkan headers" ON )
+option( VULKAN_HPP_SAMPLES_BUILD_ONLY_DYNAMIC "Build only dynamic. Required in case the Vulkan SDK is not available" OFF )
+option( VULKAN_HPP_TESTS_BUILD_WITH_LOCAL_VULKAN_HPP "Build with local Vulkan headers" ON )
+option( VULKAN_HPP_TESTS_BUILD_ONLY_DYNAMIC "Build only dynamic" OFF )
 
 # look for the file vk.xml, the ultimate source of truth for vulkan, to generate the headers from
 if( NOT DEFINED VulkanRegistry_DIR )
@@ -274,16 +324,9 @@ project( VulkanHppGenerator LANGUAGES CXX )
 
 add_executable( ${PROJECT_NAME} VulkanHppGenerator.cpp VulkanHppGenerator.hpp ${TINYXML2_SOURCES} ${TINYXML2_HEADERS} )
 
-target_compile_definitions( ${PROJECT_NAME} PUBLIC BASE_PATH="${CMAKE_SOURCE_DIR}" VK_SPEC="${vk_spec}" )
+vulkan_hpp__setup_warning_level( NAME ${PROJECT_NAME} )
 
-if( MSVC )
-       target_compile_options(${PROJECT_NAME} PRIVATE /W4 /WX )
-       if( MSVC_VER GREATER_EQUAL 1910 )
-               target_compile_options( ${PROJECT_NAME} PRIVATE /permissive- )
-       endif()
-else()
-       target_compile_options( ${PROJECT_NAME} PRIVATE -Wall -Wextra -pedantic -Werror )
-endif()
+target_compile_definitions( ${PROJECT_NAME} PUBLIC BASE_PATH="${CMAKE_SOURCE_DIR}" VK_SPEC="${vk_spec}" )
 
 target_include_directories( ${PROJECT_NAME} PRIVATE ${VULKAN_HPP_TINYXML2_SRC_DIR} )
 
index 7d6bc1a..e5a33af 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_raii( NAME 01_InitInstance )
index abffeaa..ab55d3c 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_raii( NAME 02_EnumerateDevices )
index 9b93b69..2e677b1 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_raii( NAME 03_InitDevice )
index 4321220..729fbb2 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_raii( NAME 04_InitCommandBuffer )
index fddfe69..96cd9bb 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_raii( NAME 05_InitSwapchain )
index f6342a5..1261ecf 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_raii( NAME 06_InitDepthBuffer )
index b1ac0d9..6116223 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_raii( NAME 07_InitUniformBuffer )
index 4ceb296..549c07e 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_raii( NAME 08_InitPipelineLayout )
index 8ff0290..60c630e 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_raii( NAME 09_InitDescriptorSet )
index e19871a..1872253 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_raii( NAME 10_InitRenderPass )
index f85ccdc..afa75cb 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_raii( NAME 11_InitShaders )
index 82020db..6fe86de 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_raii( NAME 12_InitFrameBuffers )
index 56daf70..a4d9394 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_raii( NAME 13_InitVertexBuffer )
index 2240e51..217acd9 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_raii( NAME 14_InitPipeline )
index 20b59b5..95e0c5f 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_raii( NAME 15_DrawCube )
index 63bd9a3..c1508a5 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_raii( NAME 16_Vulkan_1_1 )
index 741276c..52354ec 100644 (file)
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required( VERSION 3.2 )
-
-option( SAMPLES_BUILD_WITH_LOCAL_VULKAN_HPP "Build with local Vulkan headers" ON )
-option( SAMPLES_BUILD_ONLY_DYNAMIC "Build only dynamic. Required in case the Vulkan SDK is not available" OFF )
-
-if( NOT (SAMPLES_BUILD_ONLY_DYNAMIC AND SAMPLES_BUILD_WITH_LOCAL_VULKAN_HPP) )
-       find_package( Vulkan REQUIRED )
-endif()
-
-if( MSVC )
-       add_compile_options( /W4 /WX /permissive- )
-else()
-       add_compile_options( -Wall -Wextra -pedantic -Werror )
-endif()
-
-if( SAMPLES_BUILD_WITH_LOCAL_VULKAN_HPP )
-       include_directories( "${CMAKE_CURRENT_SOURCE_DIR}/.." )
-       include_directories( "${CMAKE_CURRENT_SOURCE_DIR}/../Vulkan-Headers/include" )
-else()
-       include_directories( "${Vulkan_INCLUDE_DIRS}" )
-endif()
-
 add_subdirectory( utils )
 add_subdirectory( 01_InitInstance )
 add_subdirectory( 02_EnumerateDevices )
index cf4eb07..ca9b5f5 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_raii( NAME CopyBlitImage )
index feda3da..e9a254c 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_raii( NAME CreateDebugUtilsMessenger )
index 5d605fc..3b8ba4e 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_raii( NAME DebugUtilsObjectName )
index cd0c12b..5d3b53b 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_raii( NAME DrawTexturedCube )
index 0898896..09f4493 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_raii( NAME DynamicUniform )
index ece728a..6306a05 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_raii( NAME EnableValidationWithCallback )
index 2decb09..6f4436c 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_raii( NAME EnumerateDevicesAdvanced )
index c9e387e..c4f36a2 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_raii( NAME Events )
index 5dfbdd7..7b58a70 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_raii( NAME ImmutableSampler )
index d6423cd..a9663b9 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_raii( NAME InitTexture )
index 0bc35db..3db0776 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_raii( NAME InputAttachment )
index 0014091..9734af5 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_raii( NAME InstanceExtensionProperties )
index 344f1a1..38340b5 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_raii( NAME InstanceLayerExtensionProperties )
index 78ace27..0b36669 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_raii( NAME InstanceLayerProperties )
index 7f95cc6..7a15c48 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_raii( NAME InstanceVersion )
index 6c728bd..d9fc52c 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_raii( NAME MultipleSets )
index ea80c80..2ac40fb 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_raii( NAME OcclusionQuery )
index 6a85289..3457166 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_raii( NAME PhysicalDeviceExtensions )
index 51ca099..8993a0b 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_raii( NAME PhysicalDeviceFeatures )
index fcccbd8..863c8ce 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_raii( NAME PhysicalDeviceGroups )
index 826a6de..833c43d 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_raii( NAME PhysicalDeviceMemoryProperties )
index ac37a40..5fe8d38 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_raii( NAME PhysicalDeviceProperties )
index 1c524fd..717687e 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_raii( NAME PhysicalDeviceQueueFamilyProperties )
index 1ff0753..a074427 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_raii( NAME PipelineCache )
index 018bfce..f221cd3 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_raii( NAME PipelineDerivative )
index e1a00ad..e3c8386 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_raii( NAME PushConstants )
index 5decd6b..cdf5ad4 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_raii( NAME PushDescriptors )
index 6dddb99..82225a4 100644 (file)
@@ -12,8 +12,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_raii(
     NAME RayTracing
     INCLUDE_DIRS
index be17606..e5e09e0 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_raii( NAME SecondaryCommandBuffer )
index 2502d10..f454f5e 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_raii( NAME SeparateImageSampler )
index fd9c0e2..2c826f1 100644 (file)
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 # Win32 exclusive vk::SurfaceCapabilitiesFullScreenExclusiveEXT is used
 if(WIN32)
-
   vulkan_hpp__setup_sample_raii( NAME SurfaceCapabilities )
-
 endif()
index 15f74bc..a0c5ee6 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_raii( NAME SurfaceFormats )
index 77e81d6..af0eb16 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_raii( NAME Template )
index dd50f03..2f28541 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_raii( NAME TexelBuffer )
index 1937ebf..a0ccca8 100644 (file)
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required( VERSION 3.2 )
-
-vulkan_hpp__setup_library( NAME RAII_utils HEADERS shaders.hpp utils.hpp )
+vulkan_hpp__setup_library(
+       NAME RAII_utils
+       HEADERS shaders.hpp utils.hpp
+       FOLDER "RAII_Samples" )
 
 target_link_libraries( RAII_utils INTERFACE utils )
 target_compile_definitions( RAII_utils INTERFACE VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=1 )
index 1736faf..32d9db4 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_static( NAME 01_InitInstance )
index 1aa23a3..8994488 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_dynamic( NAME 02_EnumerateDevices )
index cfa8116..5eb8b12 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_dynamic( NAME 03_InitDevice )
index 4448111..99be8f7 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_dynamic( NAME 04_InitCommandBuffer )
index 666c6f3..de267bb 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_dynamic( NAME 05_InitSwapchain )
index d44bbd0..d63cd7d 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_dynamic( NAME 06_InitDepthBuffer )
index 1321263..6ccf0be 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_dynamic( NAME 07_InitUniformBuffer )
index 494e799..93511ad 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_dynamic( NAME 08_InitPipelineLayout )
index 0106180..414d177 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_dynamic( NAME 09_InitDescriptorSet )
index c8a24af..b2d35f6 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_dynamic( NAME 10_InitRenderPass )
index 085de46..ff5fba6 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_dynamic( NAME 11_InitShaders )
index 203bed0..cf82544 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_dynamic( NAME 12_InitFrameBuffers )
index 0203e80..6730d72 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_dynamic( NAME 13_InitVertexBuffer )
index 22b77dd..2610cd2 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_dynamic( NAME 14_InitPipeline )
index 2bae8a0..9f15b55 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_dynamic( NAME 15_DrawCube )
index a1aaaae..a6d8bb7 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_dynamic( NAME 16_Vulkan_1_1 )
index 741276c..52354ec 100644 (file)
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required( VERSION 3.2 )
-
-option( SAMPLES_BUILD_WITH_LOCAL_VULKAN_HPP "Build with local Vulkan headers" ON )
-option( SAMPLES_BUILD_ONLY_DYNAMIC "Build only dynamic. Required in case the Vulkan SDK is not available" OFF )
-
-if( NOT (SAMPLES_BUILD_ONLY_DYNAMIC AND SAMPLES_BUILD_WITH_LOCAL_VULKAN_HPP) )
-       find_package( Vulkan REQUIRED )
-endif()
-
-if( MSVC )
-       add_compile_options( /W4 /WX /permissive- )
-else()
-       add_compile_options( -Wall -Wextra -pedantic -Werror )
-endif()
-
-if( SAMPLES_BUILD_WITH_LOCAL_VULKAN_HPP )
-       include_directories( "${CMAKE_CURRENT_SOURCE_DIR}/.." )
-       include_directories( "${CMAKE_CURRENT_SOURCE_DIR}/../Vulkan-Headers/include" )
-else()
-       include_directories( "${Vulkan_INCLUDE_DIRS}" )
-endif()
-
 add_subdirectory( utils )
 add_subdirectory( 01_InitInstance )
 add_subdirectory( 02_EnumerateDevices )
index 6e1721c..e6ec12f 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_dynamic( NAME CopyBlitImage )
index 5a303d6..bd9614b 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_static( NAME CreateDebugUtilsMessenger )
index 207796e..c4b33ae 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_dynamic( NAME DebugUtilsObjectName )
index 9ee833b..b67ad7b 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_dynamic( NAME DrawTexturedCube )
index dd2470f..8ea3cf5 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_dynamic( NAME DynamicUniform )
index c2cacad..049e523 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_dynamic( NAME EnableValidationWithCallback )
index 91629cb..637c7f8 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_dynamic( NAME EnumerateDevicesAdvanced )
index 861f0f9..2a403e3 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_dynamic( NAME Events )
index 69eda5b..c53849d 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_dynamic( NAME ImmutableSampler )
index 521bce5..97ef770 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_dynamic( NAME InitTexture )
index 99867aa..d963436 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_dynamic( NAME InputAttachment )
index 725df9d..635ea2b 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_static( NAME InstanceExtensionProperties )
index 2612b60..1af3441 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_static( NAME InstanceLayerExtensionProperties )
index 393db90..f3080f7 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_static( NAME InstanceLayerProperties )
index 2e3db4a..b6cfbf4 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_static( NAME InstanceVersion )
index 1a1e623..99111f1 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_dynamic( NAME MultipleSets )
index bb23e02..cd146ae 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_dynamic( NAME OcclusionQuery )
index d34ca28..7ab0d48 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_dynamic( NAME PhysicalDeviceExtensions )
index 9290b7e..04cee38 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_dynamic( NAME PhysicalDeviceFeatures )
index 998c72d..658706c 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_dynamic( NAME PhysicalDeviceGroups )
index c7d9887..f41755e 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_dynamic( NAME PhysicalDeviceMemoryProperties )
index cde9159..c1f4ca7 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_dynamic( NAME PhysicalDeviceProperties )
index 3fbf332..0d0b379 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_dynamic( NAME PhysicalDeviceQueueFamilyProperties )
index 02db362..7030add 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_dynamic( NAME PipelineCache )
index 20dcd22..361ab65 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_dynamic( NAME PipelineDerivative )
index 133612b..ea6d41f 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_dynamic( NAME PushConstants )
index 12b4c8f..7eadb94 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_dynamic( NAME PushDescriptors )
index 3e81f4b..f92282f 100644 (file)
@@ -12,8 +12,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_dynamic(
     NAME RayTracing
     INCLUDE_DIRS
index c7626b5..bd0c24e 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_dynamic( NAME SecondaryCommandBuffer )
index 09ca748..dd476b7 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_dynamic( NAME SeparateImageSampler )
index d68b160..c3779ad 100644 (file)
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 # Win32 exclusive vk::SurfaceCapabilitiesFullScreenExclusiveEXT is used
 if(WIN32)
-
   vulkan_hpp__setup_sample_dynamic( NAME SurfaceCapabilities )
-
 endif()
index a51509e..6cb6ac8 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_dynamic( NAME SurfaceFormats )
index b110b17..323c42b 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_dynamic( NAME Template )
index 8672dab..f595c64 100644 (file)
@@ -12,6 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.2)
-
 vulkan_hpp__setup_sample_dynamic( NAME TexelBuffer )
index 7e0060a..6de29f7 100644 (file)
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required( VERSION 3.2 )
-
-vulkan_hpp__setup_library( NAME utils HEADERS math.hpp shaders.hpp utils.hpp SOURCES math.cpp shaders.cpp utils.cpp )
+vulkan_hpp__setup_library(
+       NAME utils
+       HEADERS math.hpp shaders.hpp utils.hpp
+       SOURCES math.cpp shaders.cpp utils.cpp
+       FOLDER "Samples" )
 
 if( VULKAN_HPP_RUN_GENERATOR )
        add_dependencies( utils build_vulkan_hpp )
@@ -25,6 +27,6 @@ target_link_libraries( utils PUBLIC glfw )
 target_link_libraries( utils PUBLIC glslang )
 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_compile_definitionsutils PUBLIC VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=1 )
 
 target_precompile_headers( utils PRIVATE <vulkan/vulkan.hpp> )
index a9c1d3b..d3e957b 100644 (file)
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required( VERSION 3.2 )
-
-if( NOT TESTS_BUILD_ONLY_DYNAMIC )
+if( NOT VULKAN_HPP_TESTS_BUILD_ONLY_DYNAMIC )
        vulkan_hpp__setup_test( NAME ArrayProxy )
-
-       set_target_properties( ArrayProxy PROPERTIES FOLDER "Tests" )
-       target_link_libraries( ArrayProxy PRIVATE utils )
 endif()
\ No newline at end of file
index abea411..d941b3c 100644 (file)
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required( VERSION 3.2 )
-
-if( NOT TESTS_BUILD_ONLY_DYNAMIC )
+if( NOT VULKAN_HPP_TESTS_BUILD_ONLY_DYNAMIC )
        vulkan_hpp__setup_test( NAME ArrayProxyNoTemporaries )
-
-       set_target_properties( ArrayProxyNoTemporaries PROPERTIES FOLDER "Tests" )
-       target_link_libraries( ArrayProxyNoTemporaries PRIVATE utils )
 endif()
\ No newline at end of file
index e2fc33c..e9861f0 100644 (file)
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required( VERSION 3.2 )
-
-option( TESTS_BUILD_WITH_LOCAL_VULKAN_HPP "Build with local Vulkan headers" ON )
-option( TESTS_BUILD_ONLY_DYNAMIC "Build only dynamic" OFF )
-
-if( NOT (TESTS_BUILD_ONLY_DYNAMIC AND TESTS_BUILD_WITH_LOCAL_VULKAN_HPP) )
-       find_package( Vulkan REQUIRED )
-endif()
-
-if( MSVC )
-       add_compile_options( /W4 /WX /permissive- )
-else()
-       add_compile_options( -Wall -Wextra -pedantic -Werror )
-endif()
-
-if( TESTS_BUILD_WITH_LOCAL_VULKAN_HPP )
-       include_directories( "${CMAKE_CURRENT_SOURCE_DIR}/.." )
-       include_directories( "${CMAKE_CURRENT_SOURCE_DIR}/../Vulkan-Headers/include" )
-else()
-       include_directories( "${Vulkan_INCLUDE_DIRS}" )
-endif()
-
-include_directories ("${CMAKE_CURRENT_SOURCE_DIR}/../glm" )
-
 add_subdirectory( ArrayProxy )
 add_subdirectory( ArrayProxyNoTemporaries )
 add_subdirectory( DesignatedInitializers )
index 0ac99b0..d17a3a1 100644 (file)
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required( VERSION 3.2 )
-
-if( NOT TESTS_BUILD_ONLY_DYNAMIC )
+if( NOT VULKAN_HPP_TESTS_BUILD_ONLY_DYNAMIC )
        vulkan_hpp__setup_test( NAME DesignatedInitializers CXX_STANDARD 20 )
-
-       set_target_properties( DesignatedInitializers PROPERTIES FOLDER "Tests" )
-       target_link_libraries( DesignatedInitializers PRIVATE utils )
 endif()
\ No newline at end of file
index ddf3971..2bb914d 100644 (file)
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required( VERSION 3.2 )
-
-if( NOT TESTS_BUILD_ONLY_DYNAMIC )
-       vulkan_hpp__setup_test( NAME DeviceFunctions )
-
+if( NOT VULKAN_HPP_TESTS_BUILD_ONLY_DYNAMIC )
        find_package( Vulkan REQUIRED )
 
-       set_target_properties( DeviceFunctions PROPERTIES FOLDER "Tests" )
-       target_link_libraries( DeviceFunctions PRIVATE utils ${Vulkan_LIBRARIES} )
+       vulkan_hpp__setup_test( NAME DeviceFunctions LIBRARIES ${Vulkan_LIBRARIES} )
 endif()
\ No newline at end of file
index ab0de8b..d7068cb 100644 (file)
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required( VERSION 3.2 )
-
 vulkan_hpp__setup_test( NAME DispatchLoaderDynamic )
 
 if( UNIX )
        target_link_libraries( DispatchLoaderDynamic PRIVATE ${CMAKE_DL_LIBS} )
 endif()
-
-set_target_properties( DispatchLoaderDynamic PROPERTIES FOLDER "Tests" )
-target_link_libraries( DispatchLoaderDynamic PRIVATE utils )
index a7928b7..8b2ebfb 100644 (file)
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required( VERSION 3.2 )
+vulkan_hpp__setup_library(
+       SHARED
+       NAME DispatchLoaderDynamicSharedLibrary
+       SOURCES DispatchLoaderDynamicSharedLibrary.cpp
+       FOLDER "Tests" )
 
-vulkan_hpp__setup_library( NAME DispatchLoaderDynamicSharedLibrary SHARED SOURCES DispatchLoaderDynamicSharedLibrary.cpp )
-
-target_compile_definitions( DispatchLoaderDynamicSharedLibrary PRIVATE VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=1 VULKAN_HPP_STORAGE_SHARED VULKAN_HPP_STORAGE_SHARED_EXPORT )
+target_compile_definitions( DispatchLoaderDynamicSharedLibrary
+       PRIVATE VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=1
+                       VULKAN_HPP_STORAGE_SHARED VULKAN_HPP_STORAGE_SHARED_EXPORT )
 
 if( UNIX )
        target_link_libraries( DispatchLoaderDynamicSharedLibrary PRIVATE ${CMAKE_DL_LIBS} )
 endif()
-
-set_target_properties( DispatchLoaderDynamicSharedLibrary PROPERTIES FOLDER "Tests" )
-target_link_libraries( DispatchLoaderDynamicSharedLibrary PRIVATE utils )
index b2e10d6..11929ec 100644 (file)
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required( VERSION 3.2 )
+vulkan_hpp__setup_test(
+       NAME DispatchLoaderDynamicSharedLibraryClient
+       LIBRARIES DispatchLoaderDynamicSharedLibrary )
 
-vulkan_hpp__setup_test( NAME DispatchLoaderDynamicSharedLibraryClient )
-
-target_compile_definitions( DispatchLoaderDynamicSharedLibraryClient PRIVATE VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=1 VULKAN_HPP_STORAGE_SHARED )
-
-target_link_libraries( DispatchLoaderDynamicSharedLibraryClient PRIVATE DispatchLoaderDynamicSharedLibrary )
+target_compile_definitions( DispatchLoaderDynamicSharedLibraryClient
+       PRIVATE VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=1
+                       VULKAN_HPP_STORAGE_SHARED )
 
 if( UNIX )
        target_link_libraries( DispatchLoaderDynamicSharedLibraryClient PRIVATE ${CMAKE_DL_LIBS} )
 endif()
-
-set_target_properties( DispatchLoaderDynamicSharedLibraryClient PROPERTIES FOLDER "Tests" )
-target_link_libraries( DispatchLoaderDynamicSharedLibraryClient PRIVATE utils )
index 646d00f..9039002 100644 (file)
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required( VERSION 3.2 )
-
-if( NOT TESTS_BUILD_ONLY_DYNAMIC )
+if( NOT VULKAN_HPP_TESTS_BUILD_ONLY_DYNAMIC )
        find_package( Vulkan REQUIRED )
 
-       vulkan_hpp__setup_test( NAME DispatchLoaderStatic )
+       vulkan_hpp__setup_test(
+               NAME DispatchLoaderStatic
+               LIBRARIES ${Vulkan_LIBRARIES} )
 
        if( UNIX )
                target_link_libraries( DispatchLoaderStatic PRIVATE ${CMAKE_DL_LIBS} )
        endif()
-       set_target_properties( DispatchLoaderStatic PROPERTIES FOLDER "Tests" )
-       target_link_libraries( DispatchLoaderStatic PRIVATE utils ${Vulkan_LIBRARIES} )
 endif()
\ No newline at end of file
index 2181a30..22f34fd 100644 (file)
@@ -12,9 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required( VERSION 3.2 )
-
-vulkan_hpp__setup_test( NAME ExtensionInspection )
-
-set_target_properties( ExtensionInspection PROPERTIES CXX_STANDARD 20 FOLDER "Tests" )
-target_link_libraries( ExtensionInspection PRIVATE utils )
+vulkan_hpp__setup_test( NAME ExtensionInspection CXX_STANDARD 20 )
index a0da659..0cd98f7 100644 (file)
@@ -12,9 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required( VERSION 3.2 )
-
 vulkan_hpp__setup_test( NAME Flags )
-
-set_target_properties( Flags PROPERTIES FOLDER "Tests" )
-target_link_libraries( Flags PRIVATE utils )
index 2c38bd4..000f00d 100644 (file)
@@ -12,9 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required( VERSION 3.2 )
-
 vulkan_hpp__setup_test( NAME FormatTraits )
-
-set_target_properties( FormatTraits PROPERTIES FOLDER "Tests" )
-target_link_libraries( FormatTraits PRIVATE utils )
index 2bdd486..53e26c7 100644 (file)
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required( VERSION 3.2 )
-
-if( NOT TESTS_BUILD_ONLY_DYNAMIC )
+if( NOT VULKAN_HPP_TESTS_BUILD_ONLY_DYNAMIC )
        vulkan_hpp__setup_test( NAME Hash )
-
-       set_target_properties( Hash PROPERTIES FOLDER "Tests" )
-       target_link_libraries( Hash PRIVATE utils )
 endif()
\ No newline at end of file
index e60719f..3eedeab 100644 (file)
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required( VERSION 3.2 )
-
-vulkan_hpp__setup_test( NAME NoExceptions )
+vulkan_hpp__setup_test( NAME NoExceptions LIBRARIES utils )
 
 if( UNIX )
        target_link_libraries( NoExceptions PRIVATE ${CMAKE_DL_LIBS} )
 endif ()
-
-set_target_properties( NoExceptions PROPERTIES FOLDER "Tests" )
-target_link_libraries( NoExceptions PRIVATE utils )
index 9f2b6ca..e5e7018 100644 (file)
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required( VERSION 3.2 )
-
-if( NOT TESTS_BUILD_ONLY_DYNAMIC )
+if( NOT VULKAN_HPP_TESTS_BUILD_ONLY_DYNAMIC )
        vulkan_hpp__setup_test( NAME StridedArrayProxy )
-
-       set_target_properties( StridedArrayProxy PROPERTIES FOLDER "Tests" )
-       target_link_libraries( StridedArrayProxy PRIVATE utils )
 endif()
\ No newline at end of file
index b0da3b8..e5264ca 100644 (file)
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required( VERSION 3.2 )
-
 vulkan_hpp__setup_test( NAME StructureChain )
 
 if( UNIX )
        target_link_libraries( StructureChain PRIVATE ${CMAKE_DL_LIBS} )
 endif()
-
-set_target_properties( StructureChain PROPERTIES FOLDER "Tests" )
-target_link_libraries( StructureChain PRIVATE utils )
index 86a9ce3..ad72a8a 100644 (file)
@@ -12,9 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required( VERSION 3.2 )
-
 vulkan_hpp__setup_test( NAME UniqueHandle )
-
-set_target_properties( UniqueHandle PROPERTIES FOLDER "Tests" )
-target_link_libraries( UniqueHandle PRIVATE utils )
index 274815d..c053886 100644 (file)
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required( VERSION 3.2 )
-
-vulkan_hpp__setup_library( NAME UniqueHandleDefaultArguments SOURCES UniqueHandleDefaultArguments.cpp )
+vulkan_hpp__setup_library(
+       NAME UniqueHandleDefaultArguments
+       SOURCES UniqueHandleDefaultArguments.cpp
+       FOLDER "Tests" )
 
 if( UNIX )
        target_link_libraries( UniqueHandleDefaultArguments PRIVATE ${CMAKE_DL_LIBS} )
 endif()
-
-set_target_properties( UniqueHandleDefaultArguments PROPERTIES FOLDER "Tests" )
-target_link_libraries( UniqueHandleDefaultArguments PRIVATE utils )