2024-08-29 15:05:03 +08:00
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
2024-09-04 04:41:44 +08:00
|
|
|
index 56c3e23..7a4a2d6 100644
|
2024-08-29 15:05:03 +08:00
|
|
|
--- a/CMakeLists.txt
|
|
|
|
+++ b/CMakeLists.txt
|
|
|
|
@@ -17,7 +17,10 @@ option(LSQPACK_XXH "Include XXH" ON)
|
|
|
|
|
|
|
|
# Use `cmake -DBUILD_SHARED_LIBS=OFF` to build a static library.
|
|
|
|
add_library(ls-qpack "")
|
|
|
|
-target_include_directories(ls-qpack PUBLIC .)
|
|
|
|
+target_include_directories(ls-qpack PUBLIC
|
|
|
|
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
|
|
|
+ $<INSTALL_INTERFACE:include>
|
|
|
|
+)
|
|
|
|
target_sources(ls-qpack PRIVATE lsqpack.c)
|
|
|
|
|
|
|
|
if(LSQPACK_XXH)
|
|
|
|
@@ -30,7 +33,10 @@ else()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(WIN32)
|
|
|
|
- target_include_directories(ls-qpack PUBLIC wincompat)
|
|
|
|
+ target_include_directories(ls-qpack PUBLIC
|
|
|
|
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/wincompat>
|
|
|
|
+ $<INSTALL_INTERFACE:include>
|
|
|
|
+ )
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(MSVC)
|
|
|
|
@@ -106,7 +112,16 @@ if(LSQPACK_BIN)
|
|
|
|
add_subdirectory(bin)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
-install(TARGETS ls-qpack)
|
|
|
|
+install(TARGETS ls-qpack EXPORT unofficial-ls-qpack-config
|
|
|
|
+ RUNTIME DESTINATION bin
|
|
|
|
+ LIBRARY DESTINATION lib
|
|
|
|
+ ARCHIVE DESTINATION lib
|
|
|
|
+)
|
|
|
|
+install(
|
|
|
|
+ EXPORT unofficial-ls-qpack-config
|
|
|
|
+ NAMESPACE unofficial::ls-qpack::
|
|
|
|
+ DESTINATION share/unofficial-ls-qpack
|
|
|
|
+)
|
|
|
|
install(FILES lsqpack.h lsxpack_header.h DESTINATION include)
|
|
|
|
if(WIN32)
|
|
|
|
install(DIRECTORY wincompat/sys DESTINATION include)
|