Cleanup in CMakeLists.txt (#1572)

This commit is contained in:
Andreas Süßenbach
2023-05-08 11:54:57 +02:00
committed by GitHub
parent d4d0ac4859
commit 40e76b7c24
123 changed files with 100 additions and 398 deletions

View File

@@ -12,6 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
cmake_minimum_required(VERSION 3.2)
vulkan_hpp__setup_sample_static( NAME 01_InitInstance )

View File

@@ -12,6 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
cmake_minimum_required(VERSION 3.2)
vulkan_hpp__setup_sample_dynamic( NAME 02_EnumerateDevices )

View File

@@ -12,6 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
cmake_minimum_required(VERSION 3.2)
vulkan_hpp__setup_sample_dynamic( NAME 03_InitDevice )

View File

@@ -12,6 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
cmake_minimum_required(VERSION 3.2)
vulkan_hpp__setup_sample_dynamic( NAME 04_InitCommandBuffer )

View File

@@ -12,6 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
cmake_minimum_required(VERSION 3.2)
vulkan_hpp__setup_sample_dynamic( NAME 05_InitSwapchain )

View File

@@ -12,6 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
cmake_minimum_required(VERSION 3.2)
vulkan_hpp__setup_sample_dynamic( NAME 06_InitDepthBuffer )

View File

@@ -12,6 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
cmake_minimum_required(VERSION 3.2)
vulkan_hpp__setup_sample_dynamic( NAME 07_InitUniformBuffer )

View File

@@ -12,6 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
cmake_minimum_required(VERSION 3.2)
vulkan_hpp__setup_sample_dynamic( NAME 08_InitPipelineLayout )

View File

@@ -12,6 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
cmake_minimum_required(VERSION 3.2)
vulkan_hpp__setup_sample_dynamic( NAME 09_InitDescriptorSet )

View File

@@ -12,6 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
cmake_minimum_required(VERSION 3.2)
vulkan_hpp__setup_sample_dynamic( NAME 10_InitRenderPass )

View File

@@ -12,6 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
cmake_minimum_required(VERSION 3.2)
vulkan_hpp__setup_sample_dynamic( NAME 11_InitShaders )

View File

@@ -12,6 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
cmake_minimum_required(VERSION 3.2)
vulkan_hpp__setup_sample_dynamic( NAME 12_InitFrameBuffers )

View File

@@ -12,6 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
cmake_minimum_required(VERSION 3.2)
vulkan_hpp__setup_sample_dynamic( NAME 13_InitVertexBuffer )

View File

@@ -12,6 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
cmake_minimum_required(VERSION 3.2)
vulkan_hpp__setup_sample_dynamic( NAME 14_InitPipeline )

View File

@@ -12,6 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
cmake_minimum_required(VERSION 3.2)
vulkan_hpp__setup_sample_dynamic( NAME 15_DrawCube )

View File

@@ -12,6 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
cmake_minimum_required(VERSION 3.2)
vulkan_hpp__setup_sample_dynamic( NAME 16_Vulkan_1_1 )

View File

@@ -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 )

View File

@@ -12,6 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
cmake_minimum_required(VERSION 3.2)
vulkan_hpp__setup_sample_dynamic( NAME CopyBlitImage )

View File

@@ -12,6 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
cmake_minimum_required(VERSION 3.2)
vulkan_hpp__setup_sample_static( NAME CreateDebugUtilsMessenger )

View File

@@ -12,6 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
cmake_minimum_required(VERSION 3.2)
vulkan_hpp__setup_sample_dynamic( NAME DebugUtilsObjectName )

View File

@@ -12,6 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
cmake_minimum_required(VERSION 3.2)
vulkan_hpp__setup_sample_dynamic( NAME DrawTexturedCube )

View File

@@ -12,6 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
cmake_minimum_required(VERSION 3.2)
vulkan_hpp__setup_sample_dynamic( NAME DynamicUniform )

View File

@@ -12,6 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
cmake_minimum_required(VERSION 3.2)
vulkan_hpp__setup_sample_dynamic( NAME EnableValidationWithCallback )

View File

@@ -12,6 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
cmake_minimum_required(VERSION 3.2)
vulkan_hpp__setup_sample_dynamic( NAME EnumerateDevicesAdvanced )

View File

@@ -12,6 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
cmake_minimum_required(VERSION 3.2)
vulkan_hpp__setup_sample_dynamic( NAME Events )

View File

@@ -12,6 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
cmake_minimum_required(VERSION 3.2)
vulkan_hpp__setup_sample_dynamic( NAME ImmutableSampler )

View File

@@ -12,6 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
cmake_minimum_required(VERSION 3.2)
vulkan_hpp__setup_sample_dynamic( NAME InitTexture )

View File

@@ -12,6 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
cmake_minimum_required(VERSION 3.2)
vulkan_hpp__setup_sample_dynamic( NAME InputAttachment )

View File

@@ -12,6 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
cmake_minimum_required(VERSION 3.2)
vulkan_hpp__setup_sample_static( NAME InstanceExtensionProperties )

View File

@@ -12,6 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
cmake_minimum_required(VERSION 3.2)
vulkan_hpp__setup_sample_static( NAME InstanceLayerExtensionProperties )

View File

@@ -12,6 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
cmake_minimum_required(VERSION 3.2)
vulkan_hpp__setup_sample_static( NAME InstanceLayerProperties )

View File

@@ -12,6 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
cmake_minimum_required(VERSION 3.2)
vulkan_hpp__setup_sample_static( NAME InstanceVersion )

View File

@@ -12,6 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
cmake_minimum_required(VERSION 3.2)
vulkan_hpp__setup_sample_dynamic( NAME MultipleSets )

View File

@@ -12,6 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
cmake_minimum_required(VERSION 3.2)
vulkan_hpp__setup_sample_dynamic( NAME OcclusionQuery )

View File

@@ -12,6 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
cmake_minimum_required(VERSION 3.2)
vulkan_hpp__setup_sample_dynamic( NAME PhysicalDeviceExtensions )

View File

@@ -12,6 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
cmake_minimum_required(VERSION 3.2)
vulkan_hpp__setup_sample_dynamic( NAME PhysicalDeviceFeatures )

View File

@@ -12,6 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
cmake_minimum_required(VERSION 3.2)
vulkan_hpp__setup_sample_dynamic( NAME PhysicalDeviceGroups )

View File

@@ -12,6 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
cmake_minimum_required(VERSION 3.2)
vulkan_hpp__setup_sample_dynamic( NAME PhysicalDeviceMemoryProperties )

View File

@@ -12,6 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
cmake_minimum_required(VERSION 3.2)
vulkan_hpp__setup_sample_dynamic( NAME PhysicalDeviceProperties )

View File

@@ -12,6 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
cmake_minimum_required(VERSION 3.2)
vulkan_hpp__setup_sample_dynamic( NAME PhysicalDeviceQueueFamilyProperties )

View File

@@ -12,6 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
cmake_minimum_required(VERSION 3.2)
vulkan_hpp__setup_sample_dynamic( NAME PipelineCache )

View File

@@ -12,6 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
cmake_minimum_required(VERSION 3.2)
vulkan_hpp__setup_sample_dynamic( NAME PipelineDerivative )

View File

@@ -12,6 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
cmake_minimum_required(VERSION 3.2)
vulkan_hpp__setup_sample_dynamic( NAME PushConstants )

View File

@@ -12,6 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
cmake_minimum_required(VERSION 3.2)
vulkan_hpp__setup_sample_dynamic( NAME PushDescriptors )

View File

@@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
cmake_minimum_required(VERSION 3.2)
vulkan_hpp__setup_sample_dynamic(
NAME RayTracing
INCLUDE_DIRS

View File

@@ -12,6 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
cmake_minimum_required(VERSION 3.2)
vulkan_hpp__setup_sample_dynamic( NAME SecondaryCommandBuffer )

View File

@@ -12,6 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
cmake_minimum_required(VERSION 3.2)
vulkan_hpp__setup_sample_dynamic( NAME SeparateImageSampler )

View File

@@ -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()

View File

@@ -12,6 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
cmake_minimum_required(VERSION 3.2)
vulkan_hpp__setup_sample_dynamic( NAME SurfaceFormats )

View File

@@ -12,6 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
cmake_minimum_required(VERSION 3.2)
vulkan_hpp__setup_sample_dynamic( NAME Template )

View File

@@ -12,6 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
cmake_minimum_required(VERSION 3.2)
vulkan_hpp__setup_sample_dynamic( NAME TexelBuffer )

View File

@@ -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 <vulkan/vulkan.hpp> )