-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
build(cmake): improve pkg-config generation #3252
Merged
Merged
Conversation
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
With this patch the pkg-config generation when using the CMake build system is improved in the following ways: - Libs.private is now filled when needed - The JoinPaths module is now used to join paths, leading to simpler code - The .pc file is always generated, regardless of the platform, as it can also be consumed on Windows Here's how the .pc file is affected by these changes, in comparison to the one generated with the official Makefiles: $ diff -s lib/libzstd.pc build/cmake/build-old/lib/libzstd.pc 15c15 < Libs.private: -pthread --- > Libs.private: $ diff -s lib/libzstd.pc build/cmake/build-new/lib/libzstd.pc Files lib/libzstd.pc and build/cmake/build-new/lib/libzstd.pc are identical
Tachi107
force-pushed
the
build-cmake-pkg-config-always
branch
from
August 28, 2022 11:25
780030a
to
a0b09d0
Compare
This looks good to me. It reminds me, it's a bit regrettable that we don't seem to have good CI tests for |
Cyan4973
approved these changes
Sep 20, 2022
Maybe something like simdjson/simdjson#1767 (comment) ? |
Yes, something like that |
Tachi107
added a commit
to Tachi107/zstd
that referenced
this pull request
Sep 20, 2022
As mentioned in facebook#3252 (comment) , this patch adds a CI job that builds and installs libzstd on the job runner, and then compiles a sample binary linking against the installed library; the needed build flags are passed by invoking pkg-config.
Tachi107
added a commit
to Tachi107/zstd
that referenced
this pull request
Sep 20, 2022
As mentioned in facebook#3252 (comment) , this patch adds a CI job that builds and installs libzstd on the job runner, and then compiles a sample binary linking against the installed library; the needed build flags are passed by invoking pkg-config.
Tachi107
added a commit
to Tachi107/zstd
that referenced
this pull request
Sep 20, 2022
As mentioned in facebook#3252 (comment) , this patch adds a CI job that builds and installs libzstd on the job runner, and then compiles a sample binary linking against the installed library; the needed build flags are passed by invoking pkg-config.
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
With this patch the pkg-config generation when using the CMake build
system is improved in the following ways:
Here's how the .pc file is affected by these changes, in comparison to the one generated with the official Makefiles: