mirror of
https://github.com/charles-lunarg/vk-bootstrap.git
synced 2024-11-10 02:41:47 +00:00
Mark vk-bootstrap as static & cleanup CMake
Marks the main vk-bootstrap library as a static library. Removes unnecessary code, adds a language & description to the project field.
This commit is contained in:
parent
83ef1035bf
commit
f6006041c6
@ -1,5 +1,7 @@
|
||||
cmake_minimum_required(VERSION 3.10 FATAL_ERROR)
|
||||
project(VulkanBootstrap)
|
||||
project(VulkanBootstrap
|
||||
LANGUAGES CXX
|
||||
DESCRIPTION "A Vulkan utility library to ease the initialization steps in Vulkan")
|
||||
|
||||
option(VK_BOOTSTRAP_DISABLE_WARNINGS "Disable warnings during compilation" OFF)
|
||||
option(VK_BOOTSTRAP_WERROR "Enable warnings as errors during compilation" OFF)
|
||||
@ -30,7 +32,7 @@ else ()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
add_library(vk-bootstrap src/VkBootstrap.h src/VkBootstrap.cpp src/VkBootstrapDispatch.h)
|
||||
add_library(vk-bootstrap STATIC src/VkBootstrap.h src/VkBootstrap.cpp src/VkBootstrapDispatch.h)
|
||||
add_library(vk-bootstrap::vk-bootstrap ALIAS vk-bootstrap)
|
||||
|
||||
add_library(vk-bootstrap-compiler-warnings INTERFACE)
|
||||
@ -78,11 +80,12 @@ target_compile_features(vk-bootstrap PUBLIC cxx_std_14)
|
||||
|
||||
include(GNUInstallDirs)
|
||||
install(FILES src/VkBootstrap.h src/VkBootstrapDispatch.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
||||
install(TARGETS vk-bootstrap vk-bootstrap-compiler-warnings vk-bootstrap-vulkan-headers
|
||||
EXPORT vk-bootstrap-targets
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
install(TARGETS
|
||||
vk-bootstrap
|
||||
vk-bootstrap-compiler-warnings
|
||||
vk-bootstrap-vulkan-headers
|
||||
EXPORT
|
||||
vk-bootstrap-targets)
|
||||
|
||||
# By default, we want to only build tests if this repo is built standalone, but still should be configurable by the user
|
||||
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
|
||||
|
@ -5,7 +5,7 @@ target_link_libraries(vk-bootstrap-triangle
|
||||
vk-bootstrap
|
||||
vk-bootstrap-compiler-warnings
|
||||
vk-bootstrap-vulkan-headers)
|
||||
target_include_directories(vk-bootstrap-triangle PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) #path to build directory for shaders
|
||||
target_include_directories(vk-bootstrap-triangle PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) # path to build directory for shaders
|
||||
|
||||
add_custom_command(
|
||||
TARGET vk-bootstrap-triangle
|
||||
|
@ -8,7 +8,6 @@ option(CATCH_ENABLE_WERROR "" OFF)
|
||||
option(CATCH_INSTALL_DOCS "" OFF)
|
||||
option(CATCH_INSTALL_HELPERS "" OFF)
|
||||
option(CATCH_INSTALL_EXTRAS "" ON)
|
||||
set_property(GLOBAL PROPERTY CTEST_TARGETS_ADDED 1) #remove Catch2 target spam
|
||||
|
||||
include(FetchContent)
|
||||
FetchContent_Declare(
|
||||
|
Loading…
Reference in New Issue
Block a user