-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CMake: Use cmake for xxhash, fix export #70
Conversation
From microsoft/vcpkg#42767. |
I could add a fallback to pkg-config... |
try to update vcpkg tag on the ci. |
This is left to repo owners. This PR is not meant to cause build regressions. |
7577d1a
to
e00e77e
Compare
find_package(xxHash CONFIG) | ||
if(NOT xxHash_FOUND) | ||
find_package(PkgConfig REQUIRED) | ||
pkg_check_modules(LS_QPACK_XXH REQUIRED IMPORTED_TARGET libxxhash GLOBAL) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added the LS_QPACK_
prefix here because of the side effects of GLOBAL
when ls-qpack is used as a subproject.
if(LSQPACK_XXH) | ||
target_link_libraries(test_${TARGET} ls-qpack) | ||
else() | ||
target_link_libraries(test_${TARGET} ls-qpack PkgConfig::XXH) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This usage requirement is handled by CMake when linking ls-qpack.
@litespeedtech These changes and also the other changes in the next PRs are already merge in vcpkg in patch. You can take a look here: |
More interestingly, test usage of msh3 passes in microsoft/vcpkg#42788. |
xxhash provides exported CMake config when built with CMake.
This PR makes use of that config instead of reyling on pkg-config.
It also adds the corresponding
find_dependency
to this package's exported CMake config.The PR also changes the xxhash library usage to
PRIVATE
- there is no xxhash API exposed by ls-qpack AFAICS.