Skip to content

Export CPR in pkg-config when HTTP support is enabled#776

Merged
RalphSteinhagen merged 1 commit intofair-acc:mainfrom
mormj:export_cpr
Apr 22, 2026
Merged

Export CPR in pkg-config when HTTP support is enabled#776
RalphSteinhagen merged 1 commit intofair-acc:mainfrom
mormj:export_cpr

Conversation

@mormj
Copy link
Copy Markdown
Collaborator

@mormj mormj commented Apr 22, 2026

This updates the generated gnuradio4.pc so builds that consume gnuradio4 through pkg-config also pick up cpr when GR_ENABLE_HTTP is enabled.

Today libgnuradio-core.a can contain HTTP/file I/O code paths that reference cpr, but the pkg-config export only advertises the core GNU Radio libraries. Downstream projects using pkg_check_modules(gnuradio4 ...) can therefore compile successfully and then fail at link time with unresolved cpr::... symbols.

This change appends -lcpr to GR4_PKGCONFIG_EXTRA_LIBS when HTTP support is active, so the generated gnuradio4.pc reflects the actual link requirements of the installed static archive.

  • Fixes downstream link failures for pkg-config consumers of gnuradio4
  • Makes the pkg-config export consistent with the enabled feature set
  • Brings the pkg-config contract closer to the effective CMake link interface
  • No change when HTTP support is disabled
  • When HTTP support is enabled, pkg-config --libs gnuradio4 now includes -lcpr so downstream consumers link cleanly

Signed-off-by: Josh Morman <jmorman@gnuradio.org>
@RalphSteinhagen RalphSteinhagen merged commit c253c65 into fair-acc:main Apr 22, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants