Add pkgconfig file for fmt-c library - #4887
Merged
Merged
Conversation
Ferdi265
force-pushed
the
feature/fmt-c-pkgconfig
branch
3 times, most recently
from
August 19, 2026 14:27
e3cf7ba to
fdb68fb
Compare
vitaut
requested changes
Aug 20, 2026
vitaut
left a comment
Contributor
There was a problem hiding this comment.
Thanks for the PR.
fmt is an implementation dependency of fmt-c, so I think this should use Requires.private: fmt = @FMT_VERSION@ rather than putting -lfmt in Libs.
Contributor
Author
I didn't know about |
Ferdi265
force-pushed
the
feature/fmt-c-pkgconfig
branch
from
August 20, 2026 22:58
fdb68fb to
d24f86e
Compare
Contributor
Author
|
Added |
vitaut
reviewed
Aug 22, 2026
Ferdi265
force-pushed
the
feature/fmt-c-pkgconfig
branch
from
August 22, 2026 19:12
d24f86e to
1d21d9f
Compare
vitaut
approved these changes
Aug 23, 2026
Contributor
|
Merged, thanks |
This file contains hidden or 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
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.
This PR adds a pkgconfig file for the
fmt-clibrary, allowing the C API to be found and linked via pkgconfig. The CMake package already exportsfmt::fmt-c, so that doesn't need changes.The only thing I was unsure of was if
fmt-c.pcshould explicitly link-lfmtas well, or if the implicit transitive linkage is enough. For now I have added it, since thefmt::fmt-cCMake target explicitly listsfmt::fmtas a linked library as well, but it can be removed if not needed.Also, currently the
fmt::fmt-ctarget is part of thefmt_coreCMake package component, so I added thefmt_c.pcfile tofmt_coreas well. Maybe that could be changed to afmt_corfmt_c_apicomponent.