I have a mid-sized C++ project that runs on Linux, Windows and Mac OS X, both 32- and 64-bit. On some platforms it has more than one variant (e.g. Gtk-2 and Gtk-3 variants on Linux). Being mostly a hobby programmer, I don't have resources for dedicated build machines for each platform. So I installed cross-compilers for each one so that all building takes place on my Linux box.
I want to be able to build all ten or so variants with a single command. Right now I achieve this with a quick and dirty Python script that creates a makefile (actually I switched to ninja recently but it's not very relevant I guess). It creates Windows installers, Debian packages and whatnot for each variant. But I want a cleaner solution because my script is not gonna scale well as the project grows.
So my question is: What metabuild tools are able to create a single Makefile (or similar, like a ninja build file) that can handle multiple toolkits (cross-compilers) and custom commands (to create installers etc.)?
I tried CMake (and some others) but it's not obvious to me how to work with multiple toolkits. Most tools seem to create one Makefile per configuration.
Edit: Now, this answer claims that it's not possible. I don't understand why. If I can do it with my 15 minutes python script, I feel like there must be a tool able to do it for me.