mirror of
https://github.com/KhronosGroup/Vulkan-Hpp
synced 2024-11-27 14:20:10 +00:00
Cleanup in CMakeLists.txt (#1572)
This commit is contained in:
parent
d4d0ac4859
commit
40e76b7c24
@ -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} )
|
||||
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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()
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
@ -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
|
||||
|
@ -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 )
|
||||
|
@ -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 )
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user