views:

52

answers:

2

Hello,

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.

+1  A: 

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

RobertJMaynard
I did read these links before - but I was unable to figure out where exactly the use of the CDT generator would come in, or actually even where I'd be able to download the CDT generator.
sparkFinder
CDT Generator is part of the CMake program.
RobertJMaynard
+1  A: 

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.

the_void
Does the CDT project also support coding in Java?
sparkFinder
Yes, `CDT` only adds suport for `C/C++` projects to the `Eclipse IDE`. You can, at the same time, have support for `Java`, `C/C++`, `Android`, etc, etc. You will choose the type of project when you create it.
the_void