diff --git a/CMakeLists.txt b/CMakeLists.txt index 248c2c9..c0f0d8e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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} ) diff --git a/RAII_Samples/01_InitInstance/CMakeLists.txt b/RAII_Samples/01_InitInstance/CMakeLists.txt index 7d6bc1a..e5a33af 100644 --- a/RAII_Samples/01_InitInstance/CMakeLists.txt +++ b/RAII_Samples/01_InitInstance/CMakeLists.txt @@ -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 ) diff --git a/RAII_Samples/02_EnumerateDevices/CMakeLists.txt b/RAII_Samples/02_EnumerateDevices/CMakeLists.txt index abffeaa..ab55d3c 100644 --- a/RAII_Samples/02_EnumerateDevices/CMakeLists.txt +++ b/RAII_Samples/02_EnumerateDevices/CMakeLists.txt @@ -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 ) diff --git a/RAII_Samples/03_InitDevice/CMakeLists.txt b/RAII_Samples/03_InitDevice/CMakeLists.txt index 9b93b69..2e677b1 100644 --- a/RAII_Samples/03_InitDevice/CMakeLists.txt +++ b/RAII_Samples/03_InitDevice/CMakeLists.txt @@ -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 ) diff --git a/RAII_Samples/04_InitCommandBuffer/CMakeLists.txt b/RAII_Samples/04_InitCommandBuffer/CMakeLists.txt index 4321220..729fbb2 100644 --- a/RAII_Samples/04_InitCommandBuffer/CMakeLists.txt +++ b/RAII_Samples/04_InitCommandBuffer/CMakeLists.txt @@ -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 ) diff --git a/RAII_Samples/05_InitSwapchain/CMakeLists.txt b/RAII_Samples/05_InitSwapchain/CMakeLists.txt index fddfe69..96cd9bb 100644 --- a/RAII_Samples/05_InitSwapchain/CMakeLists.txt +++ b/RAII_Samples/05_InitSwapchain/CMakeLists.txt @@ -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 ) diff --git a/RAII_Samples/06_InitDepthBuffer/CMakeLists.txt b/RAII_Samples/06_InitDepthBuffer/CMakeLists.txt index f6342a5..1261ecf 100644 --- a/RAII_Samples/06_InitDepthBuffer/CMakeLists.txt +++ b/RAII_Samples/06_InitDepthBuffer/CMakeLists.txt @@ -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 ) diff --git a/RAII_Samples/07_InitUniformBuffer/CMakeLists.txt b/RAII_Samples/07_InitUniformBuffer/CMakeLists.txt index b1ac0d9..6116223 100644 --- a/RAII_Samples/07_InitUniformBuffer/CMakeLists.txt +++ b/RAII_Samples/07_InitUniformBuffer/CMakeLists.txt @@ -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 ) diff --git a/RAII_Samples/08_InitPipelineLayout/CMakeLists.txt b/RAII_Samples/08_InitPipelineLayout/CMakeLists.txt index 4ceb296..549c07e 100644 --- a/RAII_Samples/08_InitPipelineLayout/CMakeLists.txt +++ b/RAII_Samples/08_InitPipelineLayout/CMakeLists.txt @@ -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 ) diff --git a/RAII_Samples/09_InitDescriptorSet/CMakeLists.txt b/RAII_Samples/09_InitDescriptorSet/CMakeLists.txt index 8ff0290..60c630e 100644 --- a/RAII_Samples/09_InitDescriptorSet/CMakeLists.txt +++ b/RAII_Samples/09_InitDescriptorSet/CMakeLists.txt @@ -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 ) diff --git a/RAII_Samples/10_InitRenderPass/CMakeLists.txt b/RAII_Samples/10_InitRenderPass/CMakeLists.txt index e19871a..1872253 100644 --- a/RAII_Samples/10_InitRenderPass/CMakeLists.txt +++ b/RAII_Samples/10_InitRenderPass/CMakeLists.txt @@ -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 ) diff --git a/RAII_Samples/11_InitShaders/CMakeLists.txt b/RAII_Samples/11_InitShaders/CMakeLists.txt index f85ccdc..afa75cb 100644 --- a/RAII_Samples/11_InitShaders/CMakeLists.txt +++ b/RAII_Samples/11_InitShaders/CMakeLists.txt @@ -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 ) diff --git a/RAII_Samples/12_InitFrameBuffers/CMakeLists.txt b/RAII_Samples/12_InitFrameBuffers/CMakeLists.txt index 82020db..6fe86de 100644 --- a/RAII_Samples/12_InitFrameBuffers/CMakeLists.txt +++ b/RAII_Samples/12_InitFrameBuffers/CMakeLists.txt @@ -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 ) diff --git a/RAII_Samples/13_InitVertexBuffer/CMakeLists.txt b/RAII_Samples/13_InitVertexBuffer/CMakeLists.txt index 56daf70..a4d9394 100644 --- a/RAII_Samples/13_InitVertexBuffer/CMakeLists.txt +++ b/RAII_Samples/13_InitVertexBuffer/CMakeLists.txt @@ -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 ) diff --git a/RAII_Samples/14_InitPipeline/CMakeLists.txt b/RAII_Samples/14_InitPipeline/CMakeLists.txt index 2240e51..217acd9 100644 --- a/RAII_Samples/14_InitPipeline/CMakeLists.txt +++ b/RAII_Samples/14_InitPipeline/CMakeLists.txt @@ -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 ) diff --git a/RAII_Samples/15_DrawCube/CMakeLists.txt b/RAII_Samples/15_DrawCube/CMakeLists.txt index 20b59b5..95e0c5f 100644 --- a/RAII_Samples/15_DrawCube/CMakeLists.txt +++ b/RAII_Samples/15_DrawCube/CMakeLists.txt @@ -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 ) diff --git a/RAII_Samples/16_Vulkan_1_1/CMakeLists.txt b/RAII_Samples/16_Vulkan_1_1/CMakeLists.txt index 63bd9a3..c1508a5 100644 --- a/RAII_Samples/16_Vulkan_1_1/CMakeLists.txt +++ b/RAII_Samples/16_Vulkan_1_1/CMakeLists.txt @@ -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 ) diff --git a/RAII_Samples/CMakeLists.txt b/RAII_Samples/CMakeLists.txt index 741276c..52354ec 100644 --- a/RAII_Samples/CMakeLists.txt +++ b/RAII_Samples/CMakeLists.txt @@ -12,28 +12,6 @@ # 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 ) diff --git a/RAII_Samples/CopyBlitImage/CMakeLists.txt b/RAII_Samples/CopyBlitImage/CMakeLists.txt index cf4eb07..ca9b5f5 100644 --- a/RAII_Samples/CopyBlitImage/CMakeLists.txt +++ b/RAII_Samples/CopyBlitImage/CMakeLists.txt @@ -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 ) diff --git a/RAII_Samples/CreateDebugUtilsMessenger/CMakeLists.txt b/RAII_Samples/CreateDebugUtilsMessenger/CMakeLists.txt index feda3da..e9a254c 100644 --- a/RAII_Samples/CreateDebugUtilsMessenger/CMakeLists.txt +++ b/RAII_Samples/CreateDebugUtilsMessenger/CMakeLists.txt @@ -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 ) diff --git a/RAII_Samples/DebugUtilsObjectName/CMakeLists.txt b/RAII_Samples/DebugUtilsObjectName/CMakeLists.txt index 5d605fc..3b8ba4e 100644 --- a/RAII_Samples/DebugUtilsObjectName/CMakeLists.txt +++ b/RAII_Samples/DebugUtilsObjectName/CMakeLists.txt @@ -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 ) diff --git a/RAII_Samples/DrawTexturedCube/CMakeLists.txt b/RAII_Samples/DrawTexturedCube/CMakeLists.txt index cd0c12b..5d3b53b 100644 --- a/RAII_Samples/DrawTexturedCube/CMakeLists.txt +++ b/RAII_Samples/DrawTexturedCube/CMakeLists.txt @@ -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 ) diff --git a/RAII_Samples/DynamicUniform/CMakeLists.txt b/RAII_Samples/DynamicUniform/CMakeLists.txt index 0898896..09f4493 100644 --- a/RAII_Samples/DynamicUniform/CMakeLists.txt +++ b/RAII_Samples/DynamicUniform/CMakeLists.txt @@ -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 ) diff --git a/RAII_Samples/EnableValidationWithCallback/CMakeLists.txt b/RAII_Samples/EnableValidationWithCallback/CMakeLists.txt index ece728a..6306a05 100644 --- a/RAII_Samples/EnableValidationWithCallback/CMakeLists.txt +++ b/RAII_Samples/EnableValidationWithCallback/CMakeLists.txt @@ -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 ) diff --git a/RAII_Samples/EnumerateDevicesAdvanced/CMakeLists.txt b/RAII_Samples/EnumerateDevicesAdvanced/CMakeLists.txt index 2decb09..6f4436c 100644 --- a/RAII_Samples/EnumerateDevicesAdvanced/CMakeLists.txt +++ b/RAII_Samples/EnumerateDevicesAdvanced/CMakeLists.txt @@ -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 ) diff --git a/RAII_Samples/Events/CMakeLists.txt b/RAII_Samples/Events/CMakeLists.txt index c9e387e..c4f36a2 100644 --- a/RAII_Samples/Events/CMakeLists.txt +++ b/RAII_Samples/Events/CMakeLists.txt @@ -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 ) diff --git a/RAII_Samples/ImmutableSampler/CMakeLists.txt b/RAII_Samples/ImmutableSampler/CMakeLists.txt index 5dfbdd7..7b58a70 100644 --- a/RAII_Samples/ImmutableSampler/CMakeLists.txt +++ b/RAII_Samples/ImmutableSampler/CMakeLists.txt @@ -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 ) diff --git a/RAII_Samples/InitTexture/CMakeLists.txt b/RAII_Samples/InitTexture/CMakeLists.txt index d6423cd..a9663b9 100644 --- a/RAII_Samples/InitTexture/CMakeLists.txt +++ b/RAII_Samples/InitTexture/CMakeLists.txt @@ -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 ) diff --git a/RAII_Samples/InputAttachment/CMakeLists.txt b/RAII_Samples/InputAttachment/CMakeLists.txt index 0bc35db..3db0776 100644 --- a/RAII_Samples/InputAttachment/CMakeLists.txt +++ b/RAII_Samples/InputAttachment/CMakeLists.txt @@ -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 ) diff --git a/RAII_Samples/InstanceExtensionProperties/CMakeLists.txt b/RAII_Samples/InstanceExtensionProperties/CMakeLists.txt index 0014091..9734af5 100644 --- a/RAII_Samples/InstanceExtensionProperties/CMakeLists.txt +++ b/RAII_Samples/InstanceExtensionProperties/CMakeLists.txt @@ -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 ) diff --git a/RAII_Samples/InstanceLayerExtensionProperties/CMakeLists.txt b/RAII_Samples/InstanceLayerExtensionProperties/CMakeLists.txt index 344f1a1..38340b5 100644 --- a/RAII_Samples/InstanceLayerExtensionProperties/CMakeLists.txt +++ b/RAII_Samples/InstanceLayerExtensionProperties/CMakeLists.txt @@ -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 ) diff --git a/RAII_Samples/InstanceLayerProperties/CMakeLists.txt b/RAII_Samples/InstanceLayerProperties/CMakeLists.txt index 78ace27..0b36669 100644 --- a/RAII_Samples/InstanceLayerProperties/CMakeLists.txt +++ b/RAII_Samples/InstanceLayerProperties/CMakeLists.txt @@ -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 ) diff --git a/RAII_Samples/InstanceVersion/CMakeLists.txt b/RAII_Samples/InstanceVersion/CMakeLists.txt index 7f95cc6..7a15c48 100644 --- a/RAII_Samples/InstanceVersion/CMakeLists.txt +++ b/RAII_Samples/InstanceVersion/CMakeLists.txt @@ -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 ) diff --git a/RAII_Samples/MultipleSets/CMakeLists.txt b/RAII_Samples/MultipleSets/CMakeLists.txt index 6c728bd..d9fc52c 100644 --- a/RAII_Samples/MultipleSets/CMakeLists.txt +++ b/RAII_Samples/MultipleSets/CMakeLists.txt @@ -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 ) diff --git a/RAII_Samples/OcclusionQuery/CMakeLists.txt b/RAII_Samples/OcclusionQuery/CMakeLists.txt index ea80c80..2ac40fb 100644 --- a/RAII_Samples/OcclusionQuery/CMakeLists.txt +++ b/RAII_Samples/OcclusionQuery/CMakeLists.txt @@ -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 ) diff --git a/RAII_Samples/PhysicalDeviceExtensions/CMakeLists.txt b/RAII_Samples/PhysicalDeviceExtensions/CMakeLists.txt index 6a85289..3457166 100644 --- a/RAII_Samples/PhysicalDeviceExtensions/CMakeLists.txt +++ b/RAII_Samples/PhysicalDeviceExtensions/CMakeLists.txt @@ -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 ) diff --git a/RAII_Samples/PhysicalDeviceFeatures/CMakeLists.txt b/RAII_Samples/PhysicalDeviceFeatures/CMakeLists.txt index 51ca099..8993a0b 100644 --- a/RAII_Samples/PhysicalDeviceFeatures/CMakeLists.txt +++ b/RAII_Samples/PhysicalDeviceFeatures/CMakeLists.txt @@ -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 ) diff --git a/RAII_Samples/PhysicalDeviceGroups/CMakeLists.txt b/RAII_Samples/PhysicalDeviceGroups/CMakeLists.txt index fcccbd8..863c8ce 100644 --- a/RAII_Samples/PhysicalDeviceGroups/CMakeLists.txt +++ b/RAII_Samples/PhysicalDeviceGroups/CMakeLists.txt @@ -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 ) diff --git a/RAII_Samples/PhysicalDeviceMemoryProperties/CMakeLists.txt b/RAII_Samples/PhysicalDeviceMemoryProperties/CMakeLists.txt index 826a6de..833c43d 100644 --- a/RAII_Samples/PhysicalDeviceMemoryProperties/CMakeLists.txt +++ b/RAII_Samples/PhysicalDeviceMemoryProperties/CMakeLists.txt @@ -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 ) diff --git a/RAII_Samples/PhysicalDeviceProperties/CMakeLists.txt b/RAII_Samples/PhysicalDeviceProperties/CMakeLists.txt index ac37a40..5fe8d38 100644 --- a/RAII_Samples/PhysicalDeviceProperties/CMakeLists.txt +++ b/RAII_Samples/PhysicalDeviceProperties/CMakeLists.txt @@ -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 ) diff --git a/RAII_Samples/PhysicalDeviceQueueFamilyProperties/CMakeLists.txt b/RAII_Samples/PhysicalDeviceQueueFamilyProperties/CMakeLists.txt index 1c524fd..717687e 100644 --- a/RAII_Samples/PhysicalDeviceQueueFamilyProperties/CMakeLists.txt +++ b/RAII_Samples/PhysicalDeviceQueueFamilyProperties/CMakeLists.txt @@ -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 ) diff --git a/RAII_Samples/PipelineCache/CMakeLists.txt b/RAII_Samples/PipelineCache/CMakeLists.txt index 1ff0753..a074427 100644 --- a/RAII_Samples/PipelineCache/CMakeLists.txt +++ b/RAII_Samples/PipelineCache/CMakeLists.txt @@ -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 ) diff --git a/RAII_Samples/PipelineDerivative/CMakeLists.txt b/RAII_Samples/PipelineDerivative/CMakeLists.txt index 018bfce..f221cd3 100644 --- a/RAII_Samples/PipelineDerivative/CMakeLists.txt +++ b/RAII_Samples/PipelineDerivative/CMakeLists.txt @@ -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 ) diff --git a/RAII_Samples/PushConstants/CMakeLists.txt b/RAII_Samples/PushConstants/CMakeLists.txt index e1a00ad..e3c8386 100644 --- a/RAII_Samples/PushConstants/CMakeLists.txt +++ b/RAII_Samples/PushConstants/CMakeLists.txt @@ -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 ) diff --git a/RAII_Samples/PushDescriptors/CMakeLists.txt b/RAII_Samples/PushDescriptors/CMakeLists.txt index 5decd6b..cdf5ad4 100644 --- a/RAII_Samples/PushDescriptors/CMakeLists.txt +++ b/RAII_Samples/PushDescriptors/CMakeLists.txt @@ -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 ) diff --git a/RAII_Samples/RayTracing/CMakeLists.txt b/RAII_Samples/RayTracing/CMakeLists.txt index 6dddb99..82225a4 100644 --- a/RAII_Samples/RayTracing/CMakeLists.txt +++ b/RAII_Samples/RayTracing/CMakeLists.txt @@ -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 diff --git a/RAII_Samples/SecondaryCommandBuffer/CMakeLists.txt b/RAII_Samples/SecondaryCommandBuffer/CMakeLists.txt index be17606..e5e09e0 100644 --- a/RAII_Samples/SecondaryCommandBuffer/CMakeLists.txt +++ b/RAII_Samples/SecondaryCommandBuffer/CMakeLists.txt @@ -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 ) diff --git a/RAII_Samples/SeparateImageSampler/CMakeLists.txt b/RAII_Samples/SeparateImageSampler/CMakeLists.txt index 2502d10..f454f5e 100644 --- a/RAII_Samples/SeparateImageSampler/CMakeLists.txt +++ b/RAII_Samples/SeparateImageSampler/CMakeLists.txt @@ -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 ) diff --git a/RAII_Samples/SurfaceCapabilities/CMakeLists.txt b/RAII_Samples/SurfaceCapabilities/CMakeLists.txt index fd9c0e2..2c826f1 100644 --- a/RAII_Samples/SurfaceCapabilities/CMakeLists.txt +++ b/RAII_Samples/SurfaceCapabilities/CMakeLists.txt @@ -12,11 +12,7 @@ # 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() diff --git a/RAII_Samples/SurfaceFormats/CMakeLists.txt b/RAII_Samples/SurfaceFormats/CMakeLists.txt index 15f74bc..a0c5ee6 100644 --- a/RAII_Samples/SurfaceFormats/CMakeLists.txt +++ b/RAII_Samples/SurfaceFormats/CMakeLists.txt @@ -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 ) diff --git a/RAII_Samples/Template/CMakeLists.txt b/RAII_Samples/Template/CMakeLists.txt index 77e81d6..af0eb16 100644 --- a/RAII_Samples/Template/CMakeLists.txt +++ b/RAII_Samples/Template/CMakeLists.txt @@ -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 ) diff --git a/RAII_Samples/TexelBuffer/CMakeLists.txt b/RAII_Samples/TexelBuffer/CMakeLists.txt index dd50f03..2f28541 100644 --- a/RAII_Samples/TexelBuffer/CMakeLists.txt +++ b/RAII_Samples/TexelBuffer/CMakeLists.txt @@ -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 ) diff --git a/RAII_Samples/utils/CMakeLists.txt b/RAII_Samples/utils/CMakeLists.txt index 1937ebf..a0ccca8 100644 --- a/RAII_Samples/utils/CMakeLists.txt +++ b/RAII_Samples/utils/CMakeLists.txt @@ -12,9 +12,10 @@ # 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 ) diff --git a/samples/01_InitInstance/CMakeLists.txt b/samples/01_InitInstance/CMakeLists.txt index 1736faf..32d9db4 100644 --- a/samples/01_InitInstance/CMakeLists.txt +++ b/samples/01_InitInstance/CMakeLists.txt @@ -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 ) diff --git a/samples/02_EnumerateDevices/CMakeLists.txt b/samples/02_EnumerateDevices/CMakeLists.txt index 1aa23a3..8994488 100644 --- a/samples/02_EnumerateDevices/CMakeLists.txt +++ b/samples/02_EnumerateDevices/CMakeLists.txt @@ -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 ) diff --git a/samples/03_InitDevice/CMakeLists.txt b/samples/03_InitDevice/CMakeLists.txt index cfa8116..5eb8b12 100644 --- a/samples/03_InitDevice/CMakeLists.txt +++ b/samples/03_InitDevice/CMakeLists.txt @@ -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 ) diff --git a/samples/04_InitCommandBuffer/CMakeLists.txt b/samples/04_InitCommandBuffer/CMakeLists.txt index 4448111..99be8f7 100644 --- a/samples/04_InitCommandBuffer/CMakeLists.txt +++ b/samples/04_InitCommandBuffer/CMakeLists.txt @@ -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 ) diff --git a/samples/05_InitSwapchain/CMakeLists.txt b/samples/05_InitSwapchain/CMakeLists.txt index 666c6f3..de267bb 100644 --- a/samples/05_InitSwapchain/CMakeLists.txt +++ b/samples/05_InitSwapchain/CMakeLists.txt @@ -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 ) diff --git a/samples/06_InitDepthBuffer/CMakeLists.txt b/samples/06_InitDepthBuffer/CMakeLists.txt index d44bbd0..d63cd7d 100644 --- a/samples/06_InitDepthBuffer/CMakeLists.txt +++ b/samples/06_InitDepthBuffer/CMakeLists.txt @@ -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 ) diff --git a/samples/07_InitUniformBuffer/CMakeLists.txt b/samples/07_InitUniformBuffer/CMakeLists.txt index 1321263..6ccf0be 100644 --- a/samples/07_InitUniformBuffer/CMakeLists.txt +++ b/samples/07_InitUniformBuffer/CMakeLists.txt @@ -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 ) diff --git a/samples/08_InitPipelineLayout/CMakeLists.txt b/samples/08_InitPipelineLayout/CMakeLists.txt index 494e799..93511ad 100644 --- a/samples/08_InitPipelineLayout/CMakeLists.txt +++ b/samples/08_InitPipelineLayout/CMakeLists.txt @@ -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 ) diff --git a/samples/09_InitDescriptorSet/CMakeLists.txt b/samples/09_InitDescriptorSet/CMakeLists.txt index 0106180..414d177 100644 --- a/samples/09_InitDescriptorSet/CMakeLists.txt +++ b/samples/09_InitDescriptorSet/CMakeLists.txt @@ -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 ) diff --git a/samples/10_InitRenderPass/CMakeLists.txt b/samples/10_InitRenderPass/CMakeLists.txt index c8a24af..b2d35f6 100644 --- a/samples/10_InitRenderPass/CMakeLists.txt +++ b/samples/10_InitRenderPass/CMakeLists.txt @@ -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 ) diff --git a/samples/11_InitShaders/CMakeLists.txt b/samples/11_InitShaders/CMakeLists.txt index 085de46..ff5fba6 100644 --- a/samples/11_InitShaders/CMakeLists.txt +++ b/samples/11_InitShaders/CMakeLists.txt @@ -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 ) diff --git a/samples/12_InitFrameBuffers/CMakeLists.txt b/samples/12_InitFrameBuffers/CMakeLists.txt index 203bed0..cf82544 100644 --- a/samples/12_InitFrameBuffers/CMakeLists.txt +++ b/samples/12_InitFrameBuffers/CMakeLists.txt @@ -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 ) diff --git a/samples/13_InitVertexBuffer/CMakeLists.txt b/samples/13_InitVertexBuffer/CMakeLists.txt index 0203e80..6730d72 100644 --- a/samples/13_InitVertexBuffer/CMakeLists.txt +++ b/samples/13_InitVertexBuffer/CMakeLists.txt @@ -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 ) diff --git a/samples/14_InitPipeline/CMakeLists.txt b/samples/14_InitPipeline/CMakeLists.txt index 22b77dd..2610cd2 100644 --- a/samples/14_InitPipeline/CMakeLists.txt +++ b/samples/14_InitPipeline/CMakeLists.txt @@ -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 ) diff --git a/samples/15_DrawCube/CMakeLists.txt b/samples/15_DrawCube/CMakeLists.txt index 2bae8a0..9f15b55 100644 --- a/samples/15_DrawCube/CMakeLists.txt +++ b/samples/15_DrawCube/CMakeLists.txt @@ -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 ) diff --git a/samples/16_Vulkan_1_1/CMakeLists.txt b/samples/16_Vulkan_1_1/CMakeLists.txt index a1aaaae..a6d8bb7 100644 --- a/samples/16_Vulkan_1_1/CMakeLists.txt +++ b/samples/16_Vulkan_1_1/CMakeLists.txt @@ -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 ) diff --git a/samples/CMakeLists.txt b/samples/CMakeLists.txt index 741276c..52354ec 100644 --- a/samples/CMakeLists.txt +++ b/samples/CMakeLists.txt @@ -12,28 +12,6 @@ # 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 ) diff --git a/samples/CopyBlitImage/CMakeLists.txt b/samples/CopyBlitImage/CMakeLists.txt index 6e1721c..e6ec12f 100644 --- a/samples/CopyBlitImage/CMakeLists.txt +++ b/samples/CopyBlitImage/CMakeLists.txt @@ -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 ) diff --git a/samples/CreateDebugUtilsMessenger/CMakeLists.txt b/samples/CreateDebugUtilsMessenger/CMakeLists.txt index 5a303d6..bd9614b 100644 --- a/samples/CreateDebugUtilsMessenger/CMakeLists.txt +++ b/samples/CreateDebugUtilsMessenger/CMakeLists.txt @@ -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 ) diff --git a/samples/DebugUtilsObjectName/CMakeLists.txt b/samples/DebugUtilsObjectName/CMakeLists.txt index 207796e..c4b33ae 100644 --- a/samples/DebugUtilsObjectName/CMakeLists.txt +++ b/samples/DebugUtilsObjectName/CMakeLists.txt @@ -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 ) diff --git a/samples/DrawTexturedCube/CMakeLists.txt b/samples/DrawTexturedCube/CMakeLists.txt index 9ee833b..b67ad7b 100644 --- a/samples/DrawTexturedCube/CMakeLists.txt +++ b/samples/DrawTexturedCube/CMakeLists.txt @@ -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 ) diff --git a/samples/DynamicUniform/CMakeLists.txt b/samples/DynamicUniform/CMakeLists.txt index dd2470f..8ea3cf5 100644 --- a/samples/DynamicUniform/CMakeLists.txt +++ b/samples/DynamicUniform/CMakeLists.txt @@ -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 ) diff --git a/samples/EnableValidationWithCallback/CMakeLists.txt b/samples/EnableValidationWithCallback/CMakeLists.txt index c2cacad..049e523 100644 --- a/samples/EnableValidationWithCallback/CMakeLists.txt +++ b/samples/EnableValidationWithCallback/CMakeLists.txt @@ -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 ) diff --git a/samples/EnumerateDevicesAdvanced/CMakeLists.txt b/samples/EnumerateDevicesAdvanced/CMakeLists.txt index 91629cb..637c7f8 100644 --- a/samples/EnumerateDevicesAdvanced/CMakeLists.txt +++ b/samples/EnumerateDevicesAdvanced/CMakeLists.txt @@ -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 ) diff --git a/samples/Events/CMakeLists.txt b/samples/Events/CMakeLists.txt index 861f0f9..2a403e3 100644 --- a/samples/Events/CMakeLists.txt +++ b/samples/Events/CMakeLists.txt @@ -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 ) diff --git a/samples/ImmutableSampler/CMakeLists.txt b/samples/ImmutableSampler/CMakeLists.txt index 69eda5b..c53849d 100644 --- a/samples/ImmutableSampler/CMakeLists.txt +++ b/samples/ImmutableSampler/CMakeLists.txt @@ -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 ) diff --git a/samples/InitTexture/CMakeLists.txt b/samples/InitTexture/CMakeLists.txt index 521bce5..97ef770 100644 --- a/samples/InitTexture/CMakeLists.txt +++ b/samples/InitTexture/CMakeLists.txt @@ -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 ) diff --git a/samples/InputAttachment/CMakeLists.txt b/samples/InputAttachment/CMakeLists.txt index 99867aa..d963436 100644 --- a/samples/InputAttachment/CMakeLists.txt +++ b/samples/InputAttachment/CMakeLists.txt @@ -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 ) diff --git a/samples/InstanceExtensionProperties/CMakeLists.txt b/samples/InstanceExtensionProperties/CMakeLists.txt index 725df9d..635ea2b 100644 --- a/samples/InstanceExtensionProperties/CMakeLists.txt +++ b/samples/InstanceExtensionProperties/CMakeLists.txt @@ -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 ) diff --git a/samples/InstanceLayerExtensionProperties/CMakeLists.txt b/samples/InstanceLayerExtensionProperties/CMakeLists.txt index 2612b60..1af3441 100644 --- a/samples/InstanceLayerExtensionProperties/CMakeLists.txt +++ b/samples/InstanceLayerExtensionProperties/CMakeLists.txt @@ -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 ) diff --git a/samples/InstanceLayerProperties/CMakeLists.txt b/samples/InstanceLayerProperties/CMakeLists.txt index 393db90..f3080f7 100644 --- a/samples/InstanceLayerProperties/CMakeLists.txt +++ b/samples/InstanceLayerProperties/CMakeLists.txt @@ -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 ) diff --git a/samples/InstanceVersion/CMakeLists.txt b/samples/InstanceVersion/CMakeLists.txt index 2e3db4a..b6cfbf4 100644 --- a/samples/InstanceVersion/CMakeLists.txt +++ b/samples/InstanceVersion/CMakeLists.txt @@ -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 ) diff --git a/samples/MultipleSets/CMakeLists.txt b/samples/MultipleSets/CMakeLists.txt index 1a1e623..99111f1 100644 --- a/samples/MultipleSets/CMakeLists.txt +++ b/samples/MultipleSets/CMakeLists.txt @@ -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 ) diff --git a/samples/OcclusionQuery/CMakeLists.txt b/samples/OcclusionQuery/CMakeLists.txt index bb23e02..cd146ae 100644 --- a/samples/OcclusionQuery/CMakeLists.txt +++ b/samples/OcclusionQuery/CMakeLists.txt @@ -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 ) diff --git a/samples/PhysicalDeviceExtensions/CMakeLists.txt b/samples/PhysicalDeviceExtensions/CMakeLists.txt index d34ca28..7ab0d48 100644 --- a/samples/PhysicalDeviceExtensions/CMakeLists.txt +++ b/samples/PhysicalDeviceExtensions/CMakeLists.txt @@ -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 ) diff --git a/samples/PhysicalDeviceFeatures/CMakeLists.txt b/samples/PhysicalDeviceFeatures/CMakeLists.txt index 9290b7e..04cee38 100644 --- a/samples/PhysicalDeviceFeatures/CMakeLists.txt +++ b/samples/PhysicalDeviceFeatures/CMakeLists.txt @@ -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 ) diff --git a/samples/PhysicalDeviceGroups/CMakeLists.txt b/samples/PhysicalDeviceGroups/CMakeLists.txt index 998c72d..658706c 100644 --- a/samples/PhysicalDeviceGroups/CMakeLists.txt +++ b/samples/PhysicalDeviceGroups/CMakeLists.txt @@ -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 ) diff --git a/samples/PhysicalDeviceMemoryProperties/CMakeLists.txt b/samples/PhysicalDeviceMemoryProperties/CMakeLists.txt index c7d9887..f41755e 100644 --- a/samples/PhysicalDeviceMemoryProperties/CMakeLists.txt +++ b/samples/PhysicalDeviceMemoryProperties/CMakeLists.txt @@ -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 ) diff --git a/samples/PhysicalDeviceProperties/CMakeLists.txt b/samples/PhysicalDeviceProperties/CMakeLists.txt index cde9159..c1f4ca7 100644 --- a/samples/PhysicalDeviceProperties/CMakeLists.txt +++ b/samples/PhysicalDeviceProperties/CMakeLists.txt @@ -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 ) diff --git a/samples/PhysicalDeviceQueueFamilyProperties/CMakeLists.txt b/samples/PhysicalDeviceQueueFamilyProperties/CMakeLists.txt index 3fbf332..0d0b379 100644 --- a/samples/PhysicalDeviceQueueFamilyProperties/CMakeLists.txt +++ b/samples/PhysicalDeviceQueueFamilyProperties/CMakeLists.txt @@ -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 ) diff --git a/samples/PipelineCache/CMakeLists.txt b/samples/PipelineCache/CMakeLists.txt index 02db362..7030add 100644 --- a/samples/PipelineCache/CMakeLists.txt +++ b/samples/PipelineCache/CMakeLists.txt @@ -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 ) diff --git a/samples/PipelineDerivative/CMakeLists.txt b/samples/PipelineDerivative/CMakeLists.txt index 20dcd22..361ab65 100644 --- a/samples/PipelineDerivative/CMakeLists.txt +++ b/samples/PipelineDerivative/CMakeLists.txt @@ -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 ) diff --git a/samples/PushConstants/CMakeLists.txt b/samples/PushConstants/CMakeLists.txt index 133612b..ea6d41f 100644 --- a/samples/PushConstants/CMakeLists.txt +++ b/samples/PushConstants/CMakeLists.txt @@ -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 ) diff --git a/samples/PushDescriptors/CMakeLists.txt b/samples/PushDescriptors/CMakeLists.txt index 12b4c8f..7eadb94 100644 --- a/samples/PushDescriptors/CMakeLists.txt +++ b/samples/PushDescriptors/CMakeLists.txt @@ -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 ) diff --git a/samples/RayTracing/CMakeLists.txt b/samples/RayTracing/CMakeLists.txt index 3e81f4b..f92282f 100644 --- a/samples/RayTracing/CMakeLists.txt +++ b/samples/RayTracing/CMakeLists.txt @@ -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 diff --git a/samples/SecondaryCommandBuffer/CMakeLists.txt b/samples/SecondaryCommandBuffer/CMakeLists.txt index c7626b5..bd0c24e 100644 --- a/samples/SecondaryCommandBuffer/CMakeLists.txt +++ b/samples/SecondaryCommandBuffer/CMakeLists.txt @@ -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 ) diff --git a/samples/SeparateImageSampler/CMakeLists.txt b/samples/SeparateImageSampler/CMakeLists.txt index 09ca748..dd476b7 100644 --- a/samples/SeparateImageSampler/CMakeLists.txt +++ b/samples/SeparateImageSampler/CMakeLists.txt @@ -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 ) diff --git a/samples/SurfaceCapabilities/CMakeLists.txt b/samples/SurfaceCapabilities/CMakeLists.txt index d68b160..c3779ad 100644 --- a/samples/SurfaceCapabilities/CMakeLists.txt +++ b/samples/SurfaceCapabilities/CMakeLists.txt @@ -12,11 +12,7 @@ # 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() diff --git a/samples/SurfaceFormats/CMakeLists.txt b/samples/SurfaceFormats/CMakeLists.txt index a51509e..6cb6ac8 100644 --- a/samples/SurfaceFormats/CMakeLists.txt +++ b/samples/SurfaceFormats/CMakeLists.txt @@ -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 ) diff --git a/samples/Template/CMakeLists.txt b/samples/Template/CMakeLists.txt index b110b17..323c42b 100644 --- a/samples/Template/CMakeLists.txt +++ b/samples/Template/CMakeLists.txt @@ -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 ) diff --git a/samples/TexelBuffer/CMakeLists.txt b/samples/TexelBuffer/CMakeLists.txt index 8672dab..f595c64 100644 --- a/samples/TexelBuffer/CMakeLists.txt +++ b/samples/TexelBuffer/CMakeLists.txt @@ -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 ) diff --git a/samples/utils/CMakeLists.txt b/samples/utils/CMakeLists.txt index 7e0060a..6de29f7 100644 --- a/samples/utils/CMakeLists.txt +++ b/samples/utils/CMakeLists.txt @@ -12,9 +12,11 @@ # 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_definitions( utils PUBLIC VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=1 ) target_precompile_headers( utils PRIVATE ) diff --git a/tests/ArrayProxy/CMakeLists.txt b/tests/ArrayProxy/CMakeLists.txt index a9c1d3b..d3e957b 100644 --- a/tests/ArrayProxy/CMakeLists.txt +++ b/tests/ArrayProxy/CMakeLists.txt @@ -12,11 +12,6 @@ # 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 diff --git a/tests/ArrayProxyNoTemporaries/CMakeLists.txt b/tests/ArrayProxyNoTemporaries/CMakeLists.txt index abea411..d941b3c 100644 --- a/tests/ArrayProxyNoTemporaries/CMakeLists.txt +++ b/tests/ArrayProxyNoTemporaries/CMakeLists.txt @@ -12,11 +12,6 @@ # 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 diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index e2fc33c..e9861f0 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -12,30 +12,6 @@ # 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 ) diff --git a/tests/DesignatedInitializers/CMakeLists.txt b/tests/DesignatedInitializers/CMakeLists.txt index 0ac99b0..d17a3a1 100644 --- a/tests/DesignatedInitializers/CMakeLists.txt +++ b/tests/DesignatedInitializers/CMakeLists.txt @@ -12,11 +12,6 @@ # 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 diff --git a/tests/DeviceFunctions/CMakeLists.txt b/tests/DeviceFunctions/CMakeLists.txt index ddf3971..2bb914d 100644 --- a/tests/DeviceFunctions/CMakeLists.txt +++ b/tests/DeviceFunctions/CMakeLists.txt @@ -12,13 +12,8 @@ # 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 diff --git a/tests/DispatchLoaderDynamic/CMakeLists.txt b/tests/DispatchLoaderDynamic/CMakeLists.txt index ab0de8b..d7068cb 100644 --- a/tests/DispatchLoaderDynamic/CMakeLists.txt +++ b/tests/DispatchLoaderDynamic/CMakeLists.txt @@ -12,13 +12,8 @@ # 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 ) diff --git a/tests/DispatchLoaderDynamicSharedLibrary/CMakeLists.txt b/tests/DispatchLoaderDynamicSharedLibrary/CMakeLists.txt index a7928b7..8b2ebfb 100644 --- a/tests/DispatchLoaderDynamicSharedLibrary/CMakeLists.txt +++ b/tests/DispatchLoaderDynamicSharedLibrary/CMakeLists.txt @@ -12,15 +12,16 @@ # 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 ) diff --git a/tests/DispatchLoaderDynamicSharedLibraryClient/CMakeLists.txt b/tests/DispatchLoaderDynamicSharedLibraryClient/CMakeLists.txt index b2e10d6..11929ec 100644 --- a/tests/DispatchLoaderDynamicSharedLibraryClient/CMakeLists.txt +++ b/tests/DispatchLoaderDynamicSharedLibraryClient/CMakeLists.txt @@ -12,17 +12,14 @@ # 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 ) diff --git a/tests/DispatchLoaderStatic/CMakeLists.txt b/tests/DispatchLoaderStatic/CMakeLists.txt index 646d00f..9039002 100644 --- a/tests/DispatchLoaderStatic/CMakeLists.txt +++ b/tests/DispatchLoaderStatic/CMakeLists.txt @@ -12,17 +12,14 @@ # 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 diff --git a/tests/ExtensionInspection/CMakeLists.txt b/tests/ExtensionInspection/CMakeLists.txt index 2181a30..22f34fd 100644 --- a/tests/ExtensionInspection/CMakeLists.txt +++ b/tests/ExtensionInspection/CMakeLists.txt @@ -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 ) diff --git a/tests/Flags/CMakeLists.txt b/tests/Flags/CMakeLists.txt index a0da659..0cd98f7 100644 --- a/tests/Flags/CMakeLists.txt +++ b/tests/Flags/CMakeLists.txt @@ -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 ) diff --git a/tests/FormatTraits/CMakeLists.txt b/tests/FormatTraits/CMakeLists.txt index 2c38bd4..000f00d 100644 --- a/tests/FormatTraits/CMakeLists.txt +++ b/tests/FormatTraits/CMakeLists.txt @@ -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 ) diff --git a/tests/Hash/CMakeLists.txt b/tests/Hash/CMakeLists.txt index 2bdd486..53e26c7 100644 --- a/tests/Hash/CMakeLists.txt +++ b/tests/Hash/CMakeLists.txt @@ -12,11 +12,6 @@ # 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 diff --git a/tests/NoExceptions/CMakeLists.txt b/tests/NoExceptions/CMakeLists.txt index e60719f..3eedeab 100644 --- a/tests/NoExceptions/CMakeLists.txt +++ b/tests/NoExceptions/CMakeLists.txt @@ -12,13 +12,8 @@ # 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 ) diff --git a/tests/StridedArrayProxy/CMakeLists.txt b/tests/StridedArrayProxy/CMakeLists.txt index 9f2b6ca..e5e7018 100644 --- a/tests/StridedArrayProxy/CMakeLists.txt +++ b/tests/StridedArrayProxy/CMakeLists.txt @@ -12,11 +12,6 @@ # 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 diff --git a/tests/StructureChain/CMakeLists.txt b/tests/StructureChain/CMakeLists.txt index b0da3b8..e5264ca 100644 --- a/tests/StructureChain/CMakeLists.txt +++ b/tests/StructureChain/CMakeLists.txt @@ -12,13 +12,8 @@ # 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 ) diff --git a/tests/UniqueHandle/CMakeLists.txt b/tests/UniqueHandle/CMakeLists.txt index 86a9ce3..ad72a8a 100644 --- a/tests/UniqueHandle/CMakeLists.txt +++ b/tests/UniqueHandle/CMakeLists.txt @@ -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 ) diff --git a/tests/UniqueHandleDefaultArguments/CMakeLists.txt b/tests/UniqueHandleDefaultArguments/CMakeLists.txt index 274815d..c053886 100644 --- a/tests/UniqueHandleDefaultArguments/CMakeLists.txt +++ b/tests/UniqueHandleDefaultArguments/CMakeLists.txt @@ -12,13 +12,11 @@ # 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 )