Dolphin, the GameCube and Wii emulator - Forums

Full Version: Use CMake instead of SCons
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Alright, first of all: I don't have any patches, yet Tongue

However, I've thought about using CMake as Dolphin's building system instead of SCons.

First of all - what is CMake?
CMake is a cross-platform build system (just like SCons) which supports generating Makefiles (numerous variants are supported) as well as project files for some IDEs (MSVC, Code::Blocks, Eclipse). When using Makefiles, it also uses a nicer compilation output (including displaying the percentage of completion).

There's some drawbacks of using SCons which CMake would solve and some things where CMake is simply nicer to work with.

Advantages of using SCons:
- One step for setup+compilation

Disadvantages of using SCons:
- it has an IMO bad syntax. Could be just because I don't know Python though. Anyway, the syntax makes SCons harder to maintain.
- dependency checking needs to be done manually and doesn't even work right apparently (on my linux box, it won't recognize Cg properly and doesn't add WiiUse to the include path)

Disadvantages of using CMake:
- Someone has to change all those SConstruct files to CMakeLists.txt files (I'm already working on that Wink )
- it needs an additional command for generating makefiles/project files (whereas scons is like "scons OPTIONS -j4" cmake would need "cmake OPTIONS; make -j4")
- we need to add some more svn:ignores for the makefiles/project files which will be generated...

Advantages of using CMake:
- in the longer term, we might be able to ditch the vcproj files and let them be generated by CMake instead (would be better to distribute pregenerated project files ofc then) alright, seems like scons supports this as well..
- nicer compilation output
- also supports generation of RPM packages and stuff (even windows installers maybe?) => that one would be a major plus for the linux build
- dependency checking is amazingly simple and actually WORKS. CMake provides several "Modules" which provide detection of various popular libraries.

If you've got anything to add to this list, just report it Wink

I've opened an issue for this, since most devs don't visit the forums that often. Just let me know what you think of this is issue.