project('sub2', 'c') sub2_lib = library('sub2', 'lib.c') sub2_dep = declare_dependency(link_with : sub2_lib)