Author Topic: How to generate an eclipse project with cmake generator?  (Read 1751 times)

david

  • Battlemage
  • **
  • Posts: 44
    • View Profile
How to generate an eclipse project with cmake generator?
« on: 11 October 2011, 19:23:44 »
Hi all,

Here is the steps I've followed to generate the eclipse

checking out from svn:
go into the directory.

Create a directory
mkdir build
go into

execute the cmake command from build-mg.sh:
cmake -DCMAKE_INSTALL_PREFIX= -DWANT_STATIC_LIBS=ON ..
execute the cmake command to generate the eclipse project:
cmake -G"Eclipse CDT4 - Unix Makefiles" -D CMAKE_BUILD_TYPE=Debug ..

Launch Eclipse CDT and import an existing project selecting the build where the .cproject have been generated.

I can build the project and launch the binaries but I don't have the sources to edit them.
If I import them Eclipse didn't link with the cmaked libraries generated (lot of errors). But I can edit, build and launch.
Cannot update from svn with subclipse.

I think I'm on the right way but I've got to find the correct Eclipse project structure.

If someone can help me?

Thanks In advance.
« Last Edit: 14 October 2011, 20:31:25 by david »

david

  • Battlemage
  • **
  • Posts: 44
    • View Profile
Re: How to generate an eclipse project with cmake generator?
« Reply #1 on: 29 October 2011, 12:54:49 »
Hi!

I have followed instruction on wiki page:
http://glest.wikia.com/wiki/MG/CodeBlocks_Compiling

But the Rebuild Workspace doesn't work.

Maybe codeblocks workspace isn't maintained today.

If coders are using eclipse it would be great to have a wiki page for how to create the project on eclipse.
It would nice too to have the .project and the .cproject files on svn.

Thanks in advance for your answers.

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 3,960
    • View Profile
    • http://www.titusgames.de
Re: How to generate an eclipse project with cmake generator?
« Reply #2 on: 2 November 2011, 10:28:24 »
I am using eclipse( and I think softcoder too), but ... my setup is VERY crappy.
I even don't remeber how I did it. It was the first time I used Eclipse for c/c++ development and I just tried everything until I got it to work and I just use it now. So yes, a "how to setup megaglest in eclipse" in the wiki would be really really good.
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

david

  • Battlemage
  • **
  • Posts: 44
    • View Profile
Re: How to generate an eclipse project with cmake generator?
« Reply #3 on: 2 November 2011, 22:32:10 »
Ok, mine is very crappy too.

More than a how to, the workspace .project file would be the solution.
If we have that just using import wizard do the work.

But we need a clean .project file. and it's not easy to do.

Thanks for the answer.

softcoder

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 2,206
    • View Profile
    • Email
Re: How to generate an eclipse project with cmake generator?
« Reply #4 on: 2 November 2011, 23:03:25 »
I'm sure you can generate the project files for eclipse using cmake, it can create project files for nearly any compiler. I don't know the syntax but google is your friend.