Conversation
Install a pkg-config file next to the CMake package config, so consumers that discover dependencies through pkg-config can find an installed snappy. The paths come from GNUInstallDirs and handle both a relative and an absolute CMAKE_INSTALL_LIBDIR/INCLUDEDIR, so a split prefix resolves correctly. The install sits inside the existing SNAPPY_INSTALL guard. Version is read from PROJECT_VERSION, which project() already exports and which this file already uses for VERSION/SOVERSION, so the .pc cannot drift from the declared project version. Reworked Sebastien Lavoie's patch to read PROJECT_VERSION rather than introduce a separate SNAPPY_VER variable. Signed-off-by: Rudi Heitbaum <rudi@heitbaum.com>
This branch has not been deployed
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.
Motivation for re-raising this PR is the rework of the local patch we carry to add the
.pcfile given the recent activity here.A refresh of #86 — happy for it to be closed again if the policy stands. It's worth refreshing either way:
Version:now comes from@PROJECT_VERSION@rather than a newSNAPPY_VERvariable, so unlike #86 nothing here names a release and downstreams carrying it don't have to regenerate on every bump.Uses
GNUInstallDirs, handles a split prefix, sits inside the existingif(SNAPPY_INSTALL)guard. No new dependency.#86 was declined in 2019 because the C++ ecosystem had no single packaging answer and any line drawn would be arbitrary. Since then:
MODULE.bazelto register snappy in the Bazel Central Registry, maintained since by Add Bazel 9 support #228/Move//:configtoimplementation_depsto prevent header collision #229. Ecosystem metadata is already shipped; pkg-config is the gap.libsnappy-devships asnappy.pcthat upstream doesn't install. Nixpkgs writes one with a heredoc. In LibreELEC we carry it as a patch so rsyslog's configure can find snappy.The README says build-configuration contributions are unlikely to be accepted. That reads as out of date — #197, #200, #203, #213, #214, #258 and #260 are all CMakeLists.txt changes merged since. Happy to be told otherwise.
cc: @lavoiesl