[ls-qpack] Detect xxhash with pkgconf as upstream (#40751)

This commit is contained in:
talregev 2024-09-03 23:41:44 +03:00 committed by GitHub
parent 05f7a52d9e
commit 4e08971f3d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 16 additions and 9 deletions

View File

@ -1,5 +1,5 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ff26bc3..6df9654 100644
index 56c3e23..7a4a2d6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -17,7 +17,10 @@ option(LSQPACK_XXH "Include XXH" ON)

View File

@ -37,7 +37,8 @@ file(REMOVE_RECURSE
file(READ "${CURRENT_PACKAGES_DIR}/share/unofficial-ls-qpack/unofficial-ls-qpack-config.cmake" cmake_config)
file(WRITE "${CURRENT_PACKAGES_DIR}/share/unofficial-ls-qpack/unofficial-ls-qpack-config.cmake"
"include(CMakeFindDependencyMacro)
find_dependency(xxHash CONFIG)
find_dependency(PkgConfig)
pkg_check_modules(XXH REQUIRED IMPORTED_TARGET libxxhash)
${cmake_config}
")

View File

@ -1,7 +1,7 @@
{
"name": "ls-qpack",
"version": "2.5.4",
"port-version": 2,
"port-version": 3,
"description": "QPACK compression library for use with HTTP/3",
"homepage": "https://github.com/litespeedtech/ls-qpack",
"license": "MIT",

View File

@ -1,8 +1,8 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1a1f8e9..cf207d2 100644
index 1a1f8e9..56c3e23 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -20,9 +20,12 @@ add_library(ls-qpack "")
@@ -20,9 +20,13 @@ add_library(ls-qpack "")
target_include_directories(ls-qpack PUBLIC .)
target_sources(ls-qpack PRIVATE lsqpack.c)
@ -10,9 +10,10 @@ index 1a1f8e9..cf207d2 100644
if(LSQPACK_XXH)
target_sources(ls-qpack PRIVATE deps/xxhash/xxhash.c)
+else()
+ find_package(xxHash CONFIG REQUIRED)
+ target_link_libraries(ls-qpack PUBLIC xxHash::xxhash)
+ set(LSQPACK_DEPENDS "libxxhash")
+ find_package(PkgConfig REQUIRED)
+ pkg_check_modules(XXH REQUIRED IMPORTED_TARGET libxxhash)
+ target_link_libraries(ls-qpack PUBLIC PkgConfig::XXH)
+ set(LSQPACK_DEPENDS "libxxhash")
endif()
if(WIN32)

View File

@ -5518,7 +5518,7 @@
},
"ls-qpack": {
"baseline": "2.5.4",
"port-version": 2
"port-version": 3
},
"ltla-aarand": {
"baseline": "2023-03-19",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "c8b9ac167ce7e831b1434cff6f3da33cdcee974d",
"version": "2.5.4",
"port-version": 3
},
{
"git-tree": "1d9eb013f6b98de2b479869b6571ac7d0c929b0e",
"version": "2.5.4",