forked from microsoft/vcpkg
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ls-qpack] Update, revise (microsoft#42767)
- Loading branch information
Showing
8 changed files
with
126 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 86510b3..acca8be 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -36,10 +36,9 @@ if(LSQPACK_XXH) | ||
target_sources(ls-qpack PRIVATE deps/xxhash/xxhash.c) | ||
set(LSQPACK_DEPENDS "") | ||
else() | ||
- find_package(PkgConfig REQUIRED) | ||
- pkg_check_modules(XXH REQUIRED IMPORTED_TARGET libxxhash) | ||
- target_link_libraries(ls-qpack PUBLIC PkgConfig::XXH) | ||
- set(LSQPACK_DEPENDS "libxxhash") | ||
+ find_package(xxHash CONFIG REQUIRED) | ||
+ target_link_libraries(ls-qpack PRIVATE xxHash::xxhash) | ||
+ set(LSQPACK_DEPENDS "libxxhash") | ||
endif() | ||
|
||
if(WIN32) | ||
@@ -125,10 +124,14 @@ endif() | ||
include(GNUInstallDirs) | ||
configure_file(lsqpack.pc.in lsqpack.pc @ONLY) | ||
|
||
+configure_file(ls-qpack-config.cmake.in ls-qpack-config.cmake @ONLY) | ||
install(TARGETS ls-qpack EXPORT ls-qpack-config | ||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) | ||
+install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ls-qpack-config.cmake" | ||
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/ls-qpack) | ||
install( | ||
EXPORT ls-qpack-config | ||
+ FILE ls-qpack-targets.cmake | ||
NAMESPACE ls-qpack:: | ||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/ls-qpack | ||
) | ||
diff --git a/ls-qpack-config.cmake.in b/ls-qpack-config.cmake.in | ||
new file mode 100644 | ||
index 0000000..533e076 | ||
--- /dev/null | ||
+++ b/ls-qpack-config.cmake.in | ||
@@ -0,0 +1,5 @@ | ||
+if(NOT "@BUILD_SHARED_LIBS@" AND NOT "@LSQPACK_XXH@") | ||
+ include(CMakeFindDependencyMacro) | ||
+ find_dependency(xxHash CONFIG) | ||
+endif() | ||
+include("${CMAKE_CURRENT_LIST_DIR}/ls-qpack-targets.cmake") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index bcb58e3..320144b 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -41,7 +41,7 @@ else() | ||
set(LSQPACK_DEPENDS "libxxhash") | ||
endif() | ||
|
||
-if(WIN32) | ||
+if(WIN32 OR EMSCRIPTEN) | ||
target_include_directories(ls-qpack PUBLIC | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/wincompat> | ||
$<INSTALL_INTERFACE:include> | ||
@@ -149,6 +149,6 @@ if(LSQPACK_BIN) | ||
DESTINATION ${CMAKE_INSTALL_BINDIR}) | ||
endif() | ||
|
||
-if(WIN32) | ||
+if(WIN32 OR EMSCRIPTEN) | ||
install(DIRECTORY wincompat/sys DESTINATION include) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 1369bd1..bcb58e3 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -48,7 +48,7 @@ if(WIN32) | ||
) | ||
endif() | ||
|
||
-if(WIN32) | ||
+if(MSVC) | ||
target_compile_options(ls-qpack PRIVATE | ||
/Wall | ||
/wd4100 # unreffed parameter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 32eed1c..1369bd1 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -123,6 +123,8 @@ endif() | ||
|
||
include(GNUInstallDirs) | ||
configure_file(lsqpack.pc.in lsqpack.pc @ONLY) | ||
+install(FILES "${CMAKE_CURRENT_BINARY_DIR}/lsqpack.pc" | ||
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) | ||
|
||
configure_file(ls-qpack-config.cmake.in ls-qpack-config.cmake @ONLY) | ||
install(TARGETS ls-qpack EXPORT ls-qpack-config | ||
@@ -149,7 +151,4 @@ endif() | ||
|
||
if(WIN32) | ||
install(DIRECTORY wincompat/sys DESTINATION include) | ||
-else() | ||
- install(FILES "${CMAKE_CURRENT_BINARY_DIR}/lsqpack.pc" | ||
- DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) | ||
endif() | ||
diff --git a/lsqpack.pc.in b/lsqpack.pc.in | ||
index 7eac772..7c65072 100644 | ||
--- a/lsqpack.pc.in | ||
+++ b/lsqpack.pc.in | ||
@@ -7,6 +7,6 @@ Name: @PROJECT_NAME@ | ||
Description: @CMAKE_PROJECT_DESCRIPTION@ | ||
URL: @CMAKE_PROJECT_HOMEPAGE_URL@ | ||
Version: @PROJECT_VERSION@ | ||
-Requires: @LSQPACK_DEPENDS@ | ||
+Requires.private: @LSQPACK_DEPENDS@ | ||
Cflags: -I"${includedir}" | ||
-Libs: -L"${libdir}" -llsqpack | ||
+Libs: -L"${libdir}" -lls-qpack |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters