在我的cmake proejct中包括一个外部项目

发布于 2025-02-08 15:26:05 字数 804 浏览 0 评论 0原文

我需要在外部项目进入我的cmake项目。更具体地说,我需要能够在此存储库中使用模型和几何形状。

我已经克隆了存储库,并使用一般CMAKE构建过程构建了它:

cd clonedproj/
mkdir build && cd build/
cmake ../ && make

但是,没有生成 config.cmake 文件。由于此存储库具有a cmakelists.txt 假设有一种方法(例如find_packag())包含所需的组件,而无需将它们复制到我自己的项目中。我该怎么办?

ps cmakelists.txt 。相反,它主要使用install命令。

I need to include some components from an external project into my cmake project. More specifically, I need to be able to use models and geometries in this repo.

I have cloned the repo and built it using the general cmake build procedure:

cd clonedproj/
mkdir build && cd build/
cmake ../ && make

However, no config.cmake file is generated. Since this repo has a CMakeLists.txt, I assume that there is a way (e.g. find_packag()) to include the required components, without copying each of them into the my own project. How can I do so?

p.s. The CMakeLists.txt does not have any executable. Instead it mostly uses install command.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文