mirror of
https://github.com/KhronosGroup/Vulkan-Hpp
synced 2025-01-07 15:50:06 +00:00
CMake: Add SAMPLES_BUILD_ONLY_DYNAMIC option
This commit is contained in:
parent
bb40388d34
commit
a7e2cf152e
@ -14,22 +14,26 @@
|
|||||||
|
|
||||||
cmake_minimum_required(VERSION 3.2)
|
cmake_minimum_required(VERSION 3.2)
|
||||||
|
|
||||||
project(01_InitInstance)
|
if(NOT SAMPLES_BUILD_ONLY_DYNAMIC)
|
||||||
|
|
||||||
set(HEADERS
|
project(01_InitInstance)
|
||||||
)
|
|
||||||
|
set(HEADERS
|
||||||
|
)
|
||||||
|
|
||||||
|
set(SOURCES
|
||||||
|
01_InitInstance.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
source_group(headers FILES ${HEADERS})
|
||||||
|
source_group(sources FILES ${SOURCES})
|
||||||
|
|
||||||
|
add_executable(01_InitInstance
|
||||||
|
${HEADERS}
|
||||||
|
${SOURCES}
|
||||||
|
)
|
||||||
|
|
||||||
|
set_target_properties(01_InitInstance PROPERTIES FOLDER "Samples")
|
||||||
|
target_link_libraries(01_InitInstance "${Vulkan_LIBRARIES}")
|
||||||
|
|
||||||
set(SOURCES
|
endif()
|
||||||
01_InitInstance.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
source_group(headers FILES ${HEADERS})
|
|
||||||
source_group(sources FILES ${SOURCES})
|
|
||||||
|
|
||||||
add_executable(01_InitInstance
|
|
||||||
${HEADERS}
|
|
||||||
${SOURCES}
|
|
||||||
)
|
|
||||||
|
|
||||||
set_target_properties(01_InitInstance PROPERTIES FOLDER "Samples")
|
|
||||||
target_link_libraries(01_InitInstance "${Vulkan_LIBRARIES}")
|
|
@ -14,11 +14,14 @@
|
|||||||
|
|
||||||
cmake_minimum_required(VERSION 3.2)
|
cmake_minimum_required(VERSION 3.2)
|
||||||
|
|
||||||
find_package(Vulkan REQUIRED)
|
|
||||||
|
|
||||||
project(Vulkan-Hpp_Samples)
|
project(Vulkan-Hpp_Samples)
|
||||||
|
|
||||||
option (SAMPLES_BUILD_WITH_LOCAL_VULKAN_HPP "Build with local Vulkan headers" OFF)
|
option (SAMPLES_BUILD_WITH_LOCAL_VULKAN_HPP "Build with local Vulkan headers" OFF)
|
||||||
|
option (SAMPLES_BUILD_ONLY_DYNAMIC "Build only dynamic" OFF)
|
||||||
|
|
||||||
|
if(NOT (SAMPLES_BUILD_ONLY_DYNAMIC AND SAMPLES_BUILD_WITH_LOCAL_VULKAN_HPP))
|
||||||
|
find_package(Vulkan REQUIRED)
|
||||||
|
endif()
|
||||||
|
|
||||||
if (CMAKE_SYSTEM_NAME MATCHES "Windows")
|
if (CMAKE_SYSTEM_NAME MATCHES "Windows")
|
||||||
add_definitions(-DNOMINMAX -DVK_USE_PLATFORM_WIN32_KHR)
|
add_definitions(-DNOMINMAX -DVK_USE_PLATFORM_WIN32_KHR)
|
||||||
|
@ -14,22 +14,26 @@
|
|||||||
|
|
||||||
cmake_minimum_required(VERSION 3.2)
|
cmake_minimum_required(VERSION 3.2)
|
||||||
|
|
||||||
project(CreateDebugUtilsMessenger)
|
if(NOT SAMPLES_BUILD_ONLY_DYNAMIC)
|
||||||
|
|
||||||
set(HEADERS
|
project(CreateDebugUtilsMessenger)
|
||||||
)
|
|
||||||
|
set(HEADERS
|
||||||
|
)
|
||||||
|
|
||||||
|
set(SOURCES
|
||||||
|
CreateDebugUtilsMessenger.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
source_group(headers FILES ${HEADERS})
|
||||||
|
source_group(sources FILES ${SOURCES})
|
||||||
|
|
||||||
|
add_executable(CreateDebugUtilsMessenger
|
||||||
|
${HEADERS}
|
||||||
|
${SOURCES}
|
||||||
|
)
|
||||||
|
|
||||||
|
set_target_properties(CreateDebugUtilsMessenger PROPERTIES FOLDER "Samples")
|
||||||
|
target_link_libraries(CreateDebugUtilsMessenger "${Vulkan_LIBRARIES}")
|
||||||
|
|
||||||
set(SOURCES
|
endif()
|
||||||
CreateDebugUtilsMessenger.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
source_group(headers FILES ${HEADERS})
|
|
||||||
source_group(sources FILES ${SOURCES})
|
|
||||||
|
|
||||||
add_executable(CreateDebugUtilsMessenger
|
|
||||||
${HEADERS}
|
|
||||||
${SOURCES}
|
|
||||||
)
|
|
||||||
|
|
||||||
set_target_properties(CreateDebugUtilsMessenger PROPERTIES FOLDER "Samples")
|
|
||||||
target_link_libraries(CreateDebugUtilsMessenger PUBLIC "${Vulkan_LIBRARIES}")
|
|
@ -14,22 +14,26 @@
|
|||||||
|
|
||||||
cmake_minimum_required(VERSION 3.2)
|
cmake_minimum_required(VERSION 3.2)
|
||||||
|
|
||||||
project(InstanceExtensionProperties)
|
if(NOT SAMPLES_BUILD_ONLY_DYNAMIC)
|
||||||
|
|
||||||
set(HEADERS
|
project(InstanceExtensionProperties)
|
||||||
)
|
|
||||||
|
set(HEADERS
|
||||||
|
)
|
||||||
|
|
||||||
|
set(SOURCES
|
||||||
|
InstanceExtensionProperties.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
source_group(headers FILES ${HEADERS})
|
||||||
|
source_group(sources FILES ${SOURCES})
|
||||||
|
|
||||||
|
add_executable(InstanceExtensionProperties
|
||||||
|
${HEADERS}
|
||||||
|
${SOURCES}
|
||||||
|
)
|
||||||
|
|
||||||
|
set_target_properties(InstanceExtensionProperties PROPERTIES FOLDER "Samples")
|
||||||
|
target_link_libraries(InstanceExtensionProperties "${Vulkan_LIBRARIES}")
|
||||||
|
|
||||||
set(SOURCES
|
endif()
|
||||||
InstanceExtensionProperties.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
source_group(headers FILES ${HEADERS})
|
|
||||||
source_group(sources FILES ${SOURCES})
|
|
||||||
|
|
||||||
add_executable(InstanceExtensionProperties
|
|
||||||
${HEADERS}
|
|
||||||
${SOURCES}
|
|
||||||
)
|
|
||||||
|
|
||||||
set_target_properties(InstanceExtensionProperties PROPERTIES FOLDER "Samples")
|
|
||||||
target_link_libraries(InstanceExtensionProperties PUBLIC "${Vulkan_LIBRARIES}")
|
|
@ -14,22 +14,26 @@
|
|||||||
|
|
||||||
cmake_minimum_required(VERSION 3.2)
|
cmake_minimum_required(VERSION 3.2)
|
||||||
|
|
||||||
project(InstanceLayerExtensionProperties)
|
if(NOT SAMPLES_BUILD_ONLY_DYNAMIC)
|
||||||
|
|
||||||
set(HEADERS
|
project(InstanceLayerExtensionProperties)
|
||||||
)
|
|
||||||
|
set(HEADERS
|
||||||
|
)
|
||||||
|
|
||||||
|
set(SOURCES
|
||||||
|
InstanceLayerExtensionProperties.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
source_group(headers FILES ${HEADERS})
|
||||||
|
source_group(sources FILES ${SOURCES})
|
||||||
|
|
||||||
|
add_executable(InstanceLayerExtensionProperties
|
||||||
|
${HEADERS}
|
||||||
|
${SOURCES}
|
||||||
|
)
|
||||||
|
|
||||||
|
set_target_properties(InstanceLayerExtensionProperties PROPERTIES FOLDER "Samples")
|
||||||
|
target_link_libraries(InstanceLayerExtensionProperties "${Vulkan_LIBRARIES}")
|
||||||
|
|
||||||
set(SOURCES
|
endif()
|
||||||
InstanceLayerExtensionProperties.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
source_group(headers FILES ${HEADERS})
|
|
||||||
source_group(sources FILES ${SOURCES})
|
|
||||||
|
|
||||||
add_executable(InstanceLayerExtensionProperties
|
|
||||||
${HEADERS}
|
|
||||||
${SOURCES}
|
|
||||||
)
|
|
||||||
|
|
||||||
set_target_properties(InstanceLayerExtensionProperties PROPERTIES FOLDER "Samples")
|
|
||||||
target_link_libraries(InstanceLayerExtensionProperties PUBLIC "${Vulkan_LIBRARIES}")
|
|
@ -14,22 +14,26 @@
|
|||||||
|
|
||||||
cmake_minimum_required(VERSION 3.2)
|
cmake_minimum_required(VERSION 3.2)
|
||||||
|
|
||||||
project(InstanceLayerProperties)
|
if(NOT SAMPLES_BUILD_ONLY_DYNAMIC)
|
||||||
|
|
||||||
set(HEADERS
|
project(InstanceLayerProperties)
|
||||||
)
|
|
||||||
|
set(HEADERS
|
||||||
|
)
|
||||||
|
|
||||||
|
set(SOURCES
|
||||||
|
InstanceLayerProperties.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
source_group(headers FILES ${HEADERS})
|
||||||
|
source_group(sources FILES ${SOURCES})
|
||||||
|
|
||||||
|
add_executable(InstanceLayerProperties
|
||||||
|
${HEADERS}
|
||||||
|
${SOURCES}
|
||||||
|
)
|
||||||
|
|
||||||
|
set_target_properties(InstanceLayerProperties PROPERTIES FOLDER "Samples")
|
||||||
|
target_link_libraries(InstanceLayerProperties "${Vulkan_LIBRARIES}")
|
||||||
|
|
||||||
set(SOURCES
|
endif()
|
||||||
InstanceLayerProperties.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
source_group(headers FILES ${HEADERS})
|
|
||||||
source_group(sources FILES ${SOURCES})
|
|
||||||
|
|
||||||
add_executable(InstanceLayerProperties
|
|
||||||
${HEADERS}
|
|
||||||
${SOURCES}
|
|
||||||
)
|
|
||||||
|
|
||||||
set_target_properties(InstanceLayerProperties PROPERTIES FOLDER "Samples")
|
|
||||||
target_link_libraries(InstanceLayerProperties "${Vulkan_LIBRARIES}")
|
|
@ -14,22 +14,26 @@
|
|||||||
|
|
||||||
cmake_minimum_required(VERSION 3.2)
|
cmake_minimum_required(VERSION 3.2)
|
||||||
|
|
||||||
project(InstanceVersion)
|
if(NOT SAMPLES_BUILD_ONLY_DYNAMIC)
|
||||||
|
|
||||||
set(HEADERS
|
project(InstanceVersion)
|
||||||
)
|
|
||||||
|
set(HEADERS
|
||||||
|
)
|
||||||
|
|
||||||
|
set(SOURCES
|
||||||
|
InstanceVersion.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
source_group(headers FILES ${HEADERS})
|
||||||
|
source_group(sources FILES ${SOURCES})
|
||||||
|
|
||||||
|
add_executable(InstanceVersion
|
||||||
|
${HEADERS}
|
||||||
|
${SOURCES}
|
||||||
|
)
|
||||||
|
|
||||||
|
set_target_properties(InstanceVersion PROPERTIES FOLDER "Samples")
|
||||||
|
target_link_libraries(InstanceVersion "${Vulkan_LIBRARIES}")
|
||||||
|
|
||||||
set(SOURCES
|
endif()
|
||||||
InstanceVersion.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
source_group(headers FILES ${HEADERS})
|
|
||||||
source_group(sources FILES ${SOURCES})
|
|
||||||
|
|
||||||
add_executable(InstanceVersion
|
|
||||||
${HEADERS}
|
|
||||||
${SOURCES}
|
|
||||||
)
|
|
||||||
|
|
||||||
set_target_properties(InstanceVersion PROPERTIES FOLDER "Samples")
|
|
||||||
target_link_libraries(InstanceVersion PUBLIC "${Vulkan_LIBRARIES}")
|
|
Loading…
Reference in New Issue
Block a user