CMake ?

Forum for general chit-chat or off-topic discussion.

Moderators: CEGUI MVP, CEGUI Team

Pompei2
Home away from home
Home away from home
Posts: 489
Joined: Tue May 23, 2006 16:31

CMake ?

Postby Pompei2 » Sun Jan 20, 2008 01:29

Hi,

I want to try to compile CEGUI using the CMake tool (on linux). Just to be sure I don't reinvent the wheel: did anyone try to do this yet ?

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Postby CrazyEddie » Mon Jan 21, 2008 07:42

Not sure if it's been tried as yet - if you try it let us know what happens ;)

Now some waffle about CEGUI administration:

There was discussion at a developer meeting (in which I was observing and not participating) about switching the build system entirely to CMake. What the status of this is at the moment I am not sure, and am not sure if it's the right way to go either.

The discussion the devs had mainly related to having a unified build for all systems. While I agree wholeheartedly that a fully unified build is easier to maintain, it's also important to realise that there is no "silver bullet" as far as build systems go. I have looked at CMake and generally like it. I, personally, remain uncertain about moving away from what is effectively the standard on linux like systems (autotools). Though having said that, if the KDE project are using CMake, it must be good. Right?

CE.

Pompei2
Home away from home
Home away from home
Posts: 489
Joined: Tue May 23, 2006 16:31

Postby Pompei2 » Thu Feb 21, 2008 14:11

CrazyEddie wrote:There was discussion at a developer meeting (in which I was observing and not participating) about switching the build system entirely to CMake. What the status of this is at the moment I am not sure, and am not sure if it's the right way to go either.

No news yet ?

I heard (read) that more and more projects are switching to CMake and I personally prefer it. After a first try, i got everything to compile and link, but sadly my game crashes before entering the main. This means there is still something wrong with the libs being built or the way they are linked. I have not much time these days but I will try to fix it. I will keep you updated.

Rackle
CEGUI Team (Retired)
Posts: 534
Joined: Mon Jan 16, 2006 11:59
Location: Montréal

Postby Rackle » Thu Feb 21, 2008 14:25

Have a look at the first post of the NetBeans v6.0 C/C++ and Dependencies from Source thread. I've changed every project to a "detailed" implementation rather than a ./configure approach and should soon post this update.

There are also Converters from other buildsystems to CMake that could be helpful in creating new dependencies.

What compiler are you using with CMake? Since its Linux I think my Netbeans post will be helpful to you; Netbeans uses the Cygwin environment with gcc (or is it g++?).

Pompei2
Home away from home
Home away from home
Posts: 489
Joined: Tue May 23, 2006 16:31

Postby Pompei2 » Thu Feb 21, 2008 15:20

Thanks for your links.

I'm using gcc which in fact calls g++, because CEGUI is c++.

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Postby CrazyEddie » Sat Mar 01, 2008 08:02

I'm using currently CMake for something else I'm working on, and for this it does fine - although that's a much more basic project.

I am still not convinced that CMake can do what autotools does in the same 'autonomous' way. While CMake does obviously allow settings for all the configurable options, having the user set these manually kind of negates the idea of a configure step.

I also think that CMake does not allow for cross compilation - which is something I just added some rudimentary support for in the autotools build.

And now the clincher... None of what I have said above may be true - it's possible that CMake can do all that autotools can do - but the issue is that I do not know how to make it do it, whereas I can make autotools jump through hoops while doing a double-twist ;) So even if CMake is the best tool in the world, the fact that I (and presumably the other devs too) have little experience with it would be a major obstacle. Tools should make life easier; not harder. There would be no benefit in CMake if we need to go off on some three hour vision quest each time we need to discover how to make the thing do what we need.

This is all just my opinion of course - though I would be prepared to exert some 'leverage', shall we say, if I felt it was needed.

Pompei2
Home away from home
Home away from home
Posts: 489
Joined: Tue May 23, 2006 16:31

Postby Pompei2 » Sun Mar 02, 2008 13:35

The only thing that is not true in what you say is: CMake in fact does support cross compilation and CMake can do the job fully automatically. But I don't know how to cross compile :)

I am more confident with CMake than with autotools now and have (nearly) succeeded in compiling CEGUI with it. In release mode all works fine but in debug mode i have still one problem, but I think I will be able to solve it.

Currently I only build the things I need, that means SILLY, SILLYImageCodec, Base, Falagard stuff, TinyXMLParser and OpenGLRenderer and I do not intend to build the others, but If everything works fine, I could send you the CMakeLists.txt files I have written, maybe some others find it useful.

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Postby CrazyEddie » Mon Mar 03, 2008 07:50

Glad to hear that CMake can actually do a cross-compile :)

If you do get everything working please do make the CMakeLists.txt files available (or send them to us). While I have had some negativity towards this idea in general, if it were to offer an easier way to maintain the build for all users, while maintaining the level of automation we currently have, I would be happy to say goodbye to autotools and premake in favour of CMake.

It would be good to hear if anyone else has any opinions.

CE.


Return to “Offtopic Discussion”

Who is online

Users browsing this forum: No registered users and 9 guests