Commit 2448ea79 by FritzFlorian

Add support to install PLS as a cmake dependency in 3rd party projects.

parent e1baf081
Pipeline #1123 passed with stages
in 3 minutes 20 seconds
......@@ -32,18 +32,30 @@ target_link_libraries(pls
# Rules for istalling the library on a system
# ...binaries
install(TARGETS pls
INSTALL(TARGETS pls
EXPORT pls-targets
LIBRARY
DESTINATION lib
DESTINATION lib/pls
ARCHIVE
DESTINATION lib
DESTINATION lib/pls
)
# ...all headers in `include`
INSTALL (
DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/
INSTALL(
DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/pls
DESTINATION include
FILES_MATCHING PATTERN "*.h*"
)
# ...allow our project to be a cmake dependency
install(
EXPORT pls-targets
FILE plsTargets.cmake
NAMESPACE pls::
DESTINATION lib/pls
)
INSTALl(
FILES pls-config.cmake
DESTINATION lib/pls
)
# Enable warnings/tidy code checking from our compiler
target_compile_options(pls PRIVATE
......
get_filename_component(SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
include(${SELF_DIR}/plsTargets.cmake)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment