mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-28 03:26:50 +08:00
47 lines
1.3 KiB
Diff
47 lines
1.3 KiB
Diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index 56c3e23..7a4a2d6 100644
|
|
--- 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)
|