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 )
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} )
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 )
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 )
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()
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()
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()
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 )
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 )
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} )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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
# 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 )
# 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 )
# 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()
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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 )
# 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
# 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 )
# 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 )
# 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()
# 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 )
# 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 )
# 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 )
# 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 )
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 <vulkan/vulkan.hpp> )
# 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
# 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
# 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 )
# 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
# 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
# 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 )
# 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 )
# 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 )
# 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
# 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 )
# 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 )
# 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 )
# 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
# 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 )
# 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
# 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 )
# 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 )
# 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 )