mirror of
https://gitea.invidious.io/iv-org/litespeed-quic.git
synced 2024-08-15 00:53:43 +00:00
Add an installed CMake config. (#370)
* Add an installed CMake config. Does not perform transitive link to boringssl though. * Install vc_compat.h header
This commit is contained in:
parent
e237d77919
commit
797b40e7c2
3 changed files with 31 additions and 0 deletions
|
@ -336,3 +336,11 @@ INSTALL(FILES
|
|||
include/lsxpack_header.h
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/lsquic
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
# The other file in wincompat is not used in installed headers
|
||||
INSTALL(FILES
|
||||
wincompat/vc_compat.h
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/lsquic
|
||||
)
|
||||
endif()
|
||||
|
|
|
@ -130,9 +130,28 @@ 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}
|
||||
)
|
||||
|
||||
include(CMakePackageConfigHelpers)
|
||||
configure_package_config_file(
|
||||
lsquic-config.cmake ${CMAKE_CURRENT_BINARY_DIR}/lsquic-config.cmake
|
||||
INSTALL_DESTINATION share/lsquic
|
||||
NO_CHECK_REQUIRED_COMPONENTS_MACRO
|
||||
PATH_VARS CMAKE_INSTALL_INCLUDEDIR)
|
||||
|
||||
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)
|
||||
|
|
4
src/liblsquic/lsquic-config.cmake
Normal file
4
src/liblsquic/lsquic-config.cmake
Normal file
|
@ -0,0 +1,4 @@
|
|||
@PACKAGE_INIT@
|
||||
|
||||
set_and_check(lsquic_INCLUDE_DIR "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@")
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/lsquic-targets.cmake")
|
Loading…
Reference in a new issue