Skip to content
This repository was archived by the owner on Jul 19, 2022. It is now read-only.

meson: use system dependencies instead of subproject#226

Open
marcusmueller wants to merge 1 commit into
gnuradio:mainfrom
marcusmueller:meson_use_system_dependencies
Open

meson: use system dependencies instead of subproject#226
marcusmueller wants to merge 1 commit into
gnuradio:mainfrom
marcusmueller:meson_use_system_dependencies

Conversation

@marcusmueller

Copy link
Copy Markdown
Member

Since PMT(f) is rather central, let's keep the default source the subproject, but add an external_pmt meson option.

This mirrors what gnuradio/pmt#46 did to pmt (where it only affected CLI11 selection).

The motivation here is that we can now have a pmtf distro package, and let the newsched distro package build-depend on it.

Since PMT(f) is rather central, let's keep the default source the
subproject, but add an `external_pmt` meson option.

Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
Comment thread meson.build
Comment on lines +48 to +57
# Use internal PMT by default – we expect some movement here still
# But: offer option to look for external PMT lib; this should make package
# Maintainers a bit happier
if (get_option('external_pmt'))
# pmtf_dep = dependency('pmtf', version : '>=0.0.2')
pmtf_dep = dependency('pmtf', fallback : [ 'pmt' , 'pmtf_dep' ])
else
libpmtf = subproject('pmt')
pmtf_dep = libpmtf.get_variable('pmtf_dep')
endif

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't really need a custom option.

Meson has these builtins:

  • --wrap-mode=forcefallback -- prefer subprojects, always
  • --force-fallback-for=pmtf -- prefer subprojects for the pmtf dependency, specifically.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants