CMake: Add SAMPLES_BUILD_ONLY_DYNAMIC option
This commit is contained in:
@@ -14,6 +14,8 @@
|
|||||||
|
|
||||||
cmake_minimum_required(VERSION 3.2)
|
cmake_minimum_required(VERSION 3.2)
|
||||||
|
|
||||||
|
if(NOT SAMPLES_BUILD_ONLY_DYNAMIC)
|
||||||
|
|
||||||
project(01_InitInstance)
|
project(01_InitInstance)
|
||||||
|
|
||||||
set(HEADERS
|
set(HEADERS
|
||||||
@@ -33,3 +35,5 @@ add_executable(01_InitInstance
|
|||||||
|
|
||||||
set_target_properties(01_InitInstance PROPERTIES FOLDER "Samples")
|
set_target_properties(01_InitInstance PROPERTIES FOLDER "Samples")
|
||||||
target_link_libraries(01_InitInstance "${Vulkan_LIBRARIES}")
|
target_link_libraries(01_InitInstance "${Vulkan_LIBRARIES}")
|
||||||
|
|
||||||
|
endif()
|
||||||
@@ -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,6 +14,8 @@
|
|||||||
|
|
||||||
cmake_minimum_required(VERSION 3.2)
|
cmake_minimum_required(VERSION 3.2)
|
||||||
|
|
||||||
|
if(NOT SAMPLES_BUILD_ONLY_DYNAMIC)
|
||||||
|
|
||||||
project(CreateDebugUtilsMessenger)
|
project(CreateDebugUtilsMessenger)
|
||||||
|
|
||||||
set(HEADERS
|
set(HEADERS
|
||||||
@@ -32,4 +34,6 @@ add_executable(CreateDebugUtilsMessenger
|
|||||||
)
|
)
|
||||||
|
|
||||||
set_target_properties(CreateDebugUtilsMessenger PROPERTIES FOLDER "Samples")
|
set_target_properties(CreateDebugUtilsMessenger PROPERTIES FOLDER "Samples")
|
||||||
target_link_libraries(CreateDebugUtilsMessenger PUBLIC "${Vulkan_LIBRARIES}")
|
target_link_libraries(CreateDebugUtilsMessenger "${Vulkan_LIBRARIES}")
|
||||||
|
|
||||||
|
endif()
|
||||||
@@ -14,6 +14,8 @@
|
|||||||
|
|
||||||
cmake_minimum_required(VERSION 3.2)
|
cmake_minimum_required(VERSION 3.2)
|
||||||
|
|
||||||
|
if(NOT SAMPLES_BUILD_ONLY_DYNAMIC)
|
||||||
|
|
||||||
project(InstanceExtensionProperties)
|
project(InstanceExtensionProperties)
|
||||||
|
|
||||||
set(HEADERS
|
set(HEADERS
|
||||||
@@ -32,4 +34,6 @@ add_executable(InstanceExtensionProperties
|
|||||||
)
|
)
|
||||||
|
|
||||||
set_target_properties(InstanceExtensionProperties PROPERTIES FOLDER "Samples")
|
set_target_properties(InstanceExtensionProperties PROPERTIES FOLDER "Samples")
|
||||||
target_link_libraries(InstanceExtensionProperties PUBLIC "${Vulkan_LIBRARIES}")
|
target_link_libraries(InstanceExtensionProperties "${Vulkan_LIBRARIES}")
|
||||||
|
|
||||||
|
endif()
|
||||||
@@ -14,6 +14,8 @@
|
|||||||
|
|
||||||
cmake_minimum_required(VERSION 3.2)
|
cmake_minimum_required(VERSION 3.2)
|
||||||
|
|
||||||
|
if(NOT SAMPLES_BUILD_ONLY_DYNAMIC)
|
||||||
|
|
||||||
project(InstanceLayerExtensionProperties)
|
project(InstanceLayerExtensionProperties)
|
||||||
|
|
||||||
set(HEADERS
|
set(HEADERS
|
||||||
@@ -32,4 +34,6 @@ add_executable(InstanceLayerExtensionProperties
|
|||||||
)
|
)
|
||||||
|
|
||||||
set_target_properties(InstanceLayerExtensionProperties PROPERTIES FOLDER "Samples")
|
set_target_properties(InstanceLayerExtensionProperties PROPERTIES FOLDER "Samples")
|
||||||
target_link_libraries(InstanceLayerExtensionProperties PUBLIC "${Vulkan_LIBRARIES}")
|
target_link_libraries(InstanceLayerExtensionProperties "${Vulkan_LIBRARIES}")
|
||||||
|
|
||||||
|
endif()
|
||||||
@@ -14,6 +14,8 @@
|
|||||||
|
|
||||||
cmake_minimum_required(VERSION 3.2)
|
cmake_minimum_required(VERSION 3.2)
|
||||||
|
|
||||||
|
if(NOT SAMPLES_BUILD_ONLY_DYNAMIC)
|
||||||
|
|
||||||
project(InstanceLayerProperties)
|
project(InstanceLayerProperties)
|
||||||
|
|
||||||
set(HEADERS
|
set(HEADERS
|
||||||
@@ -33,3 +35,5 @@ add_executable(InstanceLayerProperties
|
|||||||
|
|
||||||
set_target_properties(InstanceLayerProperties PROPERTIES FOLDER "Samples")
|
set_target_properties(InstanceLayerProperties PROPERTIES FOLDER "Samples")
|
||||||
target_link_libraries(InstanceLayerProperties "${Vulkan_LIBRARIES}")
|
target_link_libraries(InstanceLayerProperties "${Vulkan_LIBRARIES}")
|
||||||
|
|
||||||
|
endif()
|
||||||
@@ -14,6 +14,8 @@
|
|||||||
|
|
||||||
cmake_minimum_required(VERSION 3.2)
|
cmake_minimum_required(VERSION 3.2)
|
||||||
|
|
||||||
|
if(NOT SAMPLES_BUILD_ONLY_DYNAMIC)
|
||||||
|
|
||||||
project(InstanceVersion)
|
project(InstanceVersion)
|
||||||
|
|
||||||
set(HEADERS
|
set(HEADERS
|
||||||
@@ -32,4 +34,6 @@ add_executable(InstanceVersion
|
|||||||
)
|
)
|
||||||
|
|
||||||
set_target_properties(InstanceVersion PROPERTIES FOLDER "Samples")
|
set_target_properties(InstanceVersion PROPERTIES FOLDER "Samples")
|
||||||
target_link_libraries(InstanceVersion PUBLIC "${Vulkan_LIBRARIES}")
|
target_link_libraries(InstanceVersion "${Vulkan_LIBRARIES}")
|
||||||
|
|
||||||
|
endif()
|
||||||
Reference in New Issue
Block a user