add install target

This commit is contained in:
SpaceIm 2021-03-01 18:34:23 +01:00 committed by Charles Giessen
parent 5109ef1d02
commit 55b0e4e4ad

View File

@ -29,6 +29,9 @@ target_compile_options(vk-bootstrap-compiler-warnings
/W4>
)
target_include_directories(vk-bootstrap PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>
$<INSTALL_INTERFACE:include>)
target_include_directories(vk-bootstrap PUBLIC src)
target_include_directories(vk-bootstrap PUBLIC ${Vulkan_INCLUDE_DIR})
target_link_libraries(vk-bootstrap
@ -37,6 +40,13 @@ target_link_libraries(vk-bootstrap
${CMAKE_DL_LIBS})
target_compile_features(vk-bootstrap PUBLIC cxx_std_14)
include(GNUInstallDirs)
install(FILES src/VkBootstrap.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
install(TARGETS vk-bootstrap
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
option(VK_BOOTSTRAP_TEST "Test Vk-Bootstrap with glfw and Catch2" OFF)
if (CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME OR VK_BOOTSTRAP_TEST)