如何在 Conanfile.py 中获取依赖项的 include 和库目录
在 conanfile.py 中,你可以这样获取每个依赖项的 include 和库目录列表:
conanfile.py
class MyProject(Conanfile):
# ...
def build(self):
# Check dependencies
for dependency in self.dependencies.values():
cppinfo = dependency.cpp_info.aggregated_components()
print("libdirs", cppinfo.libdirs)
print("includedirs", cppinfo.includedirs)
# ...Check out similar posts by category:
Conan
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow