project('test') foo_dep = subproject('foo').get_variable('foo_dep') subdir('bar')