配置 CMake C++/Java 项目以与 Eclipse 配合使用
我目前正在尝试建立一个 VTK 项目,该项目已预先编写了 Cmake makefile 以便与 Eclipse 一起使用。我需要使用的代码是 C++ 和 Java 代码,但我现在主要关心的是能够将现有项目转换为 Eclipse 可以理解的东西以及所有依赖项等。
请随时提出进一步的问题。
干杯。
I'm currently trying to set up a VTK project that has pre written Cmake makefiles to work with Eclipse. The code that I need to use is in both C++ and Java, but my main concern right now is actually to be able to translate the existing project into something that Eclipse can understand with all the dependencies etc.
Please feel free to ask further questions.
Cheers.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
首先,您需要 Eclipse CDT 包。
然后,您需要生成
Eclipse CDT
项目:cmake -G "Eclipse CDT4 - Unix Makefiles" /path/to/source/dir
。您需要做的最后一步是在当前工作区中导入项目:
File ->导入...->将现有项目放入工作区
。First of all you need the Eclipse CDT package.
Then you need to generate the
Eclipse CDT
project:cmake -G "Eclipse CDT4 - Unix Makefiles" /path/to/source/dir
.The last step you need to do is import the project in the current workspace:
File -> Import... -> Existing Projects Into Workspace
.在 CMake 中配置您的项目以使用 Eclipse CDT 生成器。这将为 eclipse 生成正确的 makefile。
您可能还有兴趣阅读以下讨论使用 Eclipse 的 CMake wiki 页面:
http://www.cmake.org/Wiki/Eclipse_CDT4_Generator
http://www.cmake.org/Wiki/CMake:Eclipse_UNIX_Tutorial#The_Options
Configure your project in CMake to use the Eclipse CDT Generator. That will generate the correct makefiles for eclipse.
You also might be interested in reading the follow CMake wiki pages that talk about using Eclipse:
http://www.cmake.org/Wiki/Eclipse_CDT4_Generator
http://www.cmake.org/Wiki/CMake:Eclipse_UNIX_Tutorial#The_Options