Build 如何构建依赖于另一个子项目的子项目

Build 如何构建依赖于另一个子项目的子项目,build,dependency-management,meson-build,Build,Dependency Management,Meson Build,我正在移植一组相互依赖的API。因为我这样做是为了在我的一个项目中使用,所以我把它们作为主项目的子项目来构建。但是,我不能构建依赖于C API的C++ API。它说: Neither a subproject directory nor a librsf.wrap file was found. 这很奇怪,因为我正在做的是:可能有一个子项目依赖于另一个子项目,但两者都必须在主subprojects文件夹中(librsf是C api) 我的项目目前组织如下: include/ builddir/

我正在移植一组相互依赖的API。因为我这样做是为了在我的一个项目中使用,所以我把它们作为主项目的子项目来构建。但是,我不能构建依赖于C API的C++ API。它说:

Neither a subproject directory nor a librsf.wrap file was found.
这很奇怪,因为我正在做的是:可能有一个子项目依赖于另一个子项目,但两者都必须在主subprojects文件夹中(librsf是C api)

我的项目目前组织如下:

include/
builddir/
subprojects/
-- librsf/
-- librsfpp/
meson.build
我的librsfpp meson.build如下所示:

project('librsfpp', 'cpp')

sources = ['cub.cc', 'rsf.cc']

incdir = include_directories('include')

librsf_proj = subproject('librsf')

librsf_dep = librsf_proj.get_variable('librsf_dep')

librsfpp = library('librsfpp',sources,
                   include_directories: incdir,
                   dependencies : [librsf_dep])
我可以使用librsf子项目作为主meson.build的依赖项,但不能在librsfp meson.build中使用

正确的建造方法是什么

提前谢谢