Personally, I think CMake is the least evil of those (but still pretty evil, if you want to do anything it doesn't support out of the box). I also keep an eye on premake for future projects.
In my team, we're working with premake4. Basically what you do is, you describe your project in a lua file and premake will generate VS solutions and projects (for windows) and makefiles (for Linux). It also supports xcode, I think.
The most awesome thing about it is that you have a fully working lua enviroment, so you can do pretty much anything with this system.
A bit of a downer is that premake seems to be really oriented towards VS, since it uses a very similar way of describing your build enviroment (Solutions contains projects, for example). This is sometimes annoying on other platforms, but you can work around that.
tl;dr Try premake4
Solving all those problems would definitely be nice! Though there have been so many attempts before, I'm not seeing an angle that will make Meson that much more successful.
If you need a project-generator like CMake but you want better syntax, let me recommend Premake ( http://industriousone.com/premake ). It uses Lua, build files are pretty small & elegant, and it supports lots of stuff.
I suggest using something like Premake to handle this, instead of writing the makefile yourself. It's cross-platform and can generate a bunch of different project files, including GNU makefiles. Here's a simple script that creates a project and recursively adds all files that end with ".cpp" and ".h".
I was going to say something along the same lines but with premake4. I guess, whatever works.
Also, you can always use QTCreator on Windows as well.
edit: it was already mentioned in the other comment. :| Well, I guess emphasis is good.
> The big problem with cmake, from my point of view, is that the documentation is almost unfindable, and often completely out of date.
I'm not sure what you mean by "unfindable". The website is pretty comprehensive and this page always lists a link to the latest version. I also can't really remember the last time any of those actually had outdated information.
My biggest gripe with CMake is its awful syntax. It feels like a DSL that organically grew into a half-cooked scripting language with weird scoping rules, awkward function definitions and strange control structures.
If premake has usable cross-compile support next time I'm starting a fresh project, I'll definitely try it out.
Over the past few years, I've become a fan of meta build systems. I haven't messed with project files on any platform in a long time. As a personal preference I use http://industriousone.com/premake because it's mind-numbingly simple to get setup and supports Visual Studio back to version 2002. It’s a bit of a mental leap to switch to automatic project generation, but once you do you won’t go back.
I totally agree with the other people posting in here: Do what's native for each platform. It will reduce a lot of friction.
What you can do that will help out is to use a build config tool that will automatically generate platform-native build scripts from a common build description. For example, Premake is fantastic for this. You define your build configuration once (in Lua-like syntax), then run premake to generate Makefiles on Linux, Xcode projects on Mac, or Visual Studio projects on Windows and build from that. It can also generate lots of other build scripts and project files as well.
and easy to learn and script alternative but less well known (and without GUI) is premake.
It uses lua so you don't need to learn a special script language that's only useful for the build system (like in cmake).
lua is cross platform and light so it also easily works well in major OSes.
> Microsoft Visual Studio 2002-2010, including the Express editions GNU Make, including Cygwin and MinGW Apple Xcode Code::Blocks CodeLite IC#Code SharpDevelop MonoDevelop
> Version 4.1 of Premake added experimental support for cross-compiling, targeting:
> 32- and 64-bit builds Mac OS X 32- and 64-bit universal binaries Playstation 3 (Visual Studio and GNU Make) Xbox 360 (Visual Studio only)
You'll currently need Visual Studio 2005, although I am working on abstracting that away using <code>premake</code> and thereby allowing builds with other Visual Studio versions. I have built it myself in VS 2010 and 2012 as well, but that was with premake
-generated projects and they didn't contain all aspects of the VS 2005 project.
It's unlikely that this will ever work just with the Windows SDK, as WinDirStat is currently based on the MFC, a library that doesn't ship with the SDKs (only with VS).
I thought about porting it over to WTL at some point, thus allowing to build it with more or less any compiler, but that's a bigger and more long-term project and nearly irrelevant compared to the more pressing issues.
If you run into problems with the build on a newer version of VS, feel free to ask here. Best is probably to start a new topic then and poke me via email if I don't react within a day or so. But keep the discussion public, so others can benefit from the insights you gain.
You create a 'premake4.lua' file in a working directory. After you properly fill it out, open your terminal, change to that directory, and enter 'premake4 gmake'; this generates the make files for your configured projects, where you specified. Works well for me, it's cross platform, and I love it. Basic tutorial here. Enjoy!
use premake4, it's the easiest system to use and it actually generates makefiles. So you can check out the generated files and learn from them if you want to level up your makefile knowledge.
It was an excuse to use Ruby. Also, I normally use Premake to generate makefiles on Linux, or I use Visual Studio on Windows, so I am not very good at writing Makefiles by hand. Since the compiler I am using is not based on gcc, I just didn't want to fuss with it over such a small project.