Skip to content

Commit

Permalink
add install target
Browse files Browse the repository at this point in the history
  • Loading branch information
SpaceIm authored and charles-lunarg committed Mar 1, 2021
1 parent 5109ef1 commit 55b0e4e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down

0 comments on commit 55b0e4e

Please sign in to comment.