The system has come a fairly long way up to now and is in a state where it can do almost anything you might want it to do on Windows and Linux. It needs thorough testing so that it hopefully might become the official build system, provided that it's to the team's liking.
You can grab the latest copy here: http://downloads.oddbeat.de/ogre.cmake.zip
Instructions are included.
Reading some recent forum posts suggests that the non-VS build systems sometimes get missed and lack newly created files from the build process. So I thought this sounds like a job for a cross-platform build system. I know, there have been requests before for a CMake build system, and since I wanted to get some more practice with CMake anyway, I went ahead and created one for Shoggoth head.
Or rather, the basic foundation for it. Ogre's various platforms are not exactly coherent in their building behaviour in some regards, and getting those quirks right is not exactly trivial (read: it is easier to use CMake if you plan with it from the beginning rather than fit it in retroactively), so it needs to be considered a work in progress. It works fairly well on Linux, though (at least for me), and it's imho so much nicer than the autotools
Anyway, I've uploaded my current version, you can get it here: CMake build files
Please do take note of the issues below. If you will, you could consider it a case study, and I'd be interested to know if anyone thinks this might have some future with Ogre (after sorting out the quirks, of course). Or, more precisely: Should I try to improve it further, or is Ogre covered enough in terms of build systems?
For anyone not familiar with CMake, here are some of the more interesting features it could offer:
- Single build system for all platforms. If this build system is modified (i. e. new source files added), the changes would reflect everywhere.
- Coherent configuration utility. CMake builds can be configured via a GUI where you can set specific options. For example, you can specify which parts to build, and it can even set the OgreConfig.h options. You can configure static or dynamic builds, threading level etc.
- Produces native build solutions for the targeted platform. On Windows you get Visual Studio solutions very similar to the custom-built Ogre ones, whereas it creates very nice Makefiles for Unix or mingw. It can also create CodeBlocks projects, though they are admittedly not as nice because it just throws everything into one big project at the moment. On Mac there's an XCode generator.
- Builds usually happen out of source, i. e. you provide a work directory differing from your source dir, leaving the latter free from compiled clutter.
- CMake is accompanied by CPack which is a package generator utility. It can package builds for the various platforms, for example it can generate NSIS installers on Windows or .debs and .rpms on Linux. If setup properly, this might make for a (semi-)automated build of official SDK distributions for various platforms fully integrated into the build system. But I haven't investigated this further.
- There's no make uninstall for Linux
- No pkg-config description is generated for Linux
- Precompiled headers on Windows are not working
- Debug build of OgreMain on Windows is not quite working. The linking fails, claiming to have exceeded memory restrictions. There must be some compile option set in the original Ogre projects that I have missed, or maybe it's the use of a precompiled header, dunno. It's kind of hard to find out since each change results in a full rebuild of OgreMain.
- DLLs on Windows are not copied to the Samples/Common/bin dir. Setting this up is slightly awkward, I'd actually prefer to build the samples in the top bin directory (the need for a separate samples bin dir never quite struck me).