aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
diff options
context:
space:
mode:
authorDaniel Mensinger <daniel@mensinger-ka.de>2020-10-13 16:10:29 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2020-10-13 23:51:25 +0300
commite00df9046defea68ca449635d9ce3e849bc70807 (patch)
treebf3a1760aea16b8856f4d22359663eb48760099e /mesonbuild
parent3372c58ca633e2bc7d5b36bcd7e0d14d12e0f82a (diff)
downloadmeson-e00df9046defea68ca449635d9ce3e849bc70807.zip
meson-e00df9046defea68ca449635d9ce3e849bc70807.tar.gz
meson-e00df9046defea68ca449635d9ce3e849bc70807.tar.bz2
include_type: honor include_type in dependency fallbacks (fixes #7503)
Diffstat (limited to 'mesonbuild')
-rw-r--r--mesonbuild/interpreter.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py
index be19af3..f25a6f3 100644
--- a/mesonbuild/interpreter.py
+++ b/mesonbuild/interpreter.py
@@ -3687,9 +3687,17 @@ external dependencies (including libraries) must go to "dependencies".''')
if not_found_message:
self.message_impl([not_found_message])
raise
+ assert isinstance(d, DependencyHolder)
if not d.found() and not_found_message:
self.message_impl([not_found_message])
self.message_impl([not_found_message])
+ # Ensure the correct include type
+ if 'include_type' in kwargs:
+ wanted = kwargs['include_type']
+ actual = d.include_type_method([], {})
+ if wanted != actual:
+ mlog.debug('Current include type of {} is {}. Converting to requested {}'.format(name, actual, wanted))
+ d = d.as_system_method([wanted], {})
# Override this dependency to have consistent results in subsequent
# dependency lookups.
if name and d.found():