Skip to content

Commit

Permalink
Add an installed CMake config.
Browse files Browse the repository at this point in the history
Does not perform transitive link to boringssl though.
  • Loading branch information
rpavlik committed Apr 21, 2022
1 parent bc20c35 commit 183fbac
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/liblsquic/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,22 @@ ELSE()
add_library(lsquic STATIC ${lsquic_STAT_SRCS})
ENDIF()

target_include_directories(
lsquic PUBLIC $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/lsquic>)

install(TARGETS lsquic
EXPORT lsquic-targets
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
)

configure_file(lsquic-config.cmake ${CMAKE_CURRENT_BINARY_DIR}/lsquic-config.cmake @ONLY)
install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/lsquic-config.cmake
DESTINATION share/lsquic)

install(
EXPORT lsquic-targets
DESTINATION share/lsquic
NAMESPACE lsquic::
FILE lsquic-targets.cmake)
1 change: 1 addition & 0 deletions src/liblsquic/lsquic-config.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include("${CMAKE_CURRENT_LIST_DIR}/lsquic-targets.cmake")

0 comments on commit 183fbac

Please sign in to comment.