[Mesa-dev] [Bug 109062] meson incorrectly handles/reports libdrm_$foo
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Tue Dec 18 17:46:42 UTC 2018
https://bugs.freedesktop.org/show_bug.cgi?id=109062
--- Comment #9 from Dylan Baker <baker.dylan.c at gmail.com> ---
tl;dr: that only works if you can *always know* that you wont need a fallback
and that the only way to discover all of the dependencies is via pkg-config and
not via cmake or a *-config tool.
imagine you have something like this:
dep1 = dependency('foo', version : ['>= 1.0', '< 2.0'], fallback : ['foo',
'dep_foo'])
dep2 = dependency('bar', version : '> 2.1', fallback : ['bar', 'dep_bar'])
deps = [dep1, dep2]
Which says, find foo and bar, and if you can't find them (and fallbacks aren't
disabled) build subproject foo and get the declare_dependency object dep_foo
and return that, and do the same for bar.
Now, we could probably write this as:
deps = dependency(['foo', 'bar'], version : [['>= 1.0', '< 2.0'], '> 2.1'],
fallback : [['foo', 'dep_foo'], ['bar', 'dep_bar']])
but that's a pretty confusing syntax, and if pkg-config fails then we still
have to either re-run it once for each dependency and put all of that together,
or parse the human readable output and try to figure out which dependencies
were missing, and rerun with on the the ones that were found and then fallback
to the rest.
The imagine that bar only provides a BarConfig.CMake file, or that bar provides
both cmake and pkg-config, or that it only provides a bar-config script.
--
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20181218/f67b7b74/attachment.html>
More information about the mesa-dev
mailing list