project('sub') foo_dep = declare_dependency() meson.override_dependency('foo', foo_dep) bar_dep = declare_dependency()