2020-01-30 08:15:10 +00:00
|
|
|
cmake_minimum_required(VERSION 3.10 FATAL_ERROR)
|
|
|
|
project(VulkanBootstrap)
|
|
|
|
|
|
|
|
find_package(Vulkan REQUIRED)
|
|
|
|
|
2020-01-31 22:23:22 +00:00
|
|
|
add_library(vk-bootstrap src/VkBootstrap.h src/VkBootstrap.cpp)
|
2020-03-25 18:15:36 +00:00
|
|
|
add_library(vk-bootstrap::vk-bootstrap ALIAS vk-bootstrap)
|
2020-01-30 08:15:10 +00:00
|
|
|
|
2020-03-26 16:40:47 +00:00
|
|
|
add_library(vk-bootstrap-compiler-warnings INTERFACE)
|
|
|
|
target_compile_options(vk-bootstrap-compiler-warnings
|
|
|
|
INTERFACE
|
2020-03-08 05:58:23 +00:00
|
|
|
$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>,$<CXX_COMPILER_ID:GNU>>:
|
|
|
|
-Wall
|
|
|
|
-Wextra
|
|
|
|
-pedantic-errors
|
|
|
|
-Wconversion
|
|
|
|
-Wsign-conversion>
|
|
|
|
$<$<CXX_COMPILER_ID:MSVC>:
|
|
|
|
/WX
|
2020-03-26 16:40:47 +00:00
|
|
|
/W4>
|
|
|
|
)
|
2020-01-30 08:15:10 +00:00
|
|
|
|
2020-03-26 16:40:47 +00:00
|
|
|
target_include_directories(vk-bootstrap PUBLIC src)
|
|
|
|
target_include_directories(vk-bootstrap PUBLIC ${Vulkan_INCLUDE_DIR})
|
|
|
|
target_link_libraries(vk-bootstrap
|
|
|
|
PUBLIC ${Vulkan_LIBRARY}
|
|
|
|
PRIVATE
|
|
|
|
vk-bootstrap-compiler-warnings)
|
2020-03-07 08:44:34 +00:00
|
|
|
|
2020-03-26 16:40:47 +00:00
|
|
|
option(VK_BOOTSTRAP_TEST "Test Vk-Bootstrap with glfw and Catch2" OFF)
|
2020-03-07 08:44:34 +00:00
|
|
|
|
2020-03-26 16:40:47 +00:00
|
|
|
if (CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME OR VK_BOOTSTRAP_TEST)
|
|
|
|
add_subdirectory(ext)
|
|
|
|
add_subdirectory(tests)
|
|
|
|
add_subdirectory(example)
|
2020-03-25 18:15:36 +00:00
|
|
|
endif ()
|