[SDL] CMake gurus...
havoc at ghdigital.com
Sat Mar 23 21:04:31 PDT 2013
I admit my solution in my projects is a hand-rolled Makefile that adapts to all manner of situations (and yes, essentially implements configure functionality) such as mingw (both native and
cross-compiled)/Mac OSX/Linux/FreeBSD/Solaris, and then a set of Visual Studio projects and an xcode project that tend to lag behind badly.
I've found cmake very unwieldy as a "user" personally, it scares me each time I have to deal with a lib using cmake, it's not well explained (even by its own documentation), the workflow of building
something with cmake is not readily obvious to a non-believer as it were.
Plenty of horror stories with autotools as well and I'd never recommend it either.
It seems that there's a lot of demand for something that just generates sensible VS projects, XCode projects, and a gmake Makefile for various uses, but I'm not sure that cmake set out to be that
On 03/23/2013 08:57 PM, Sik the hedgehog wrote:
> Wouldn't the situation end up being exactly the same on Linux too?
> CMake isn't installed by default either, and if I recall correctly the
> idea is to ditch autotools there (though yes, I can vouch for the
> command line version of CMake being easier to get working).
> It seems like the problem here is teaching programmers how to use
> CMake altogether.
> 2013/3/24, Ryan C. Gordon <icculus at icculus.org>:
>>> Ideally we would use something make-ish that was generic enough to act
>>> as both a build system, AND a configure system, but I don't recall any
>>> logic languages being standard installs anywhere.
>> Ideally we want Windows people to find a Visual Studio project that
>> matches their version of Visual Studio, double-click it, and build the
>> Right now we're maintaining several .vcproj files for different
>> versions, and almost universally, some subset of them fails to get
>> updated when we change a project setting of add/remove files. Tests are
>> missing from many of them, etc.
>> XCode is slightly better about this, but still suffers from the fact
>> that it's not necessarily our primary way to build SDL (even on Mac, I'm
>> using the configure script, for example), so it isn't well-maintained
>> If not CMake, something that allows us to do what CMake does is really
>> really interesting: we maintain one text file, it spits out projects for
>> lots of tools. But we really don't want the Windows/Mac experience to be
>> like this:
>> - Download SDL sources.
>> - There's no Visual Studio project?!
>> - Read the readme, find out I'm supposed to use CMakeLists.txt (which is
>> the worst naming choice ever, btw).
>> - Download CMake.
>> - Install CMake.
>> - Run CMake-gui.
>> - Maybe understand I was supposed to point it at the SDL root directory.
>> - Maybe understand I should set the output directory somewhere outside
>> of the source tree.
>> - Maybe understand that the poorly-built dropdown list actually scrolls,
>> and my compiler is, in fact, supported.
>> - Click configure (maybe twice).
>> - Generate project files.
>> - Launch Visual Studio with the project files.
>> - Compile.
>> What I'd _rather_ they do is this:
>> - Download SDL sources.
>> - Double-click the correct .sln file in the "VisualStudio" directory,
>> which we generated with CMake when packaging up the sources.
>> - Compile.
>> I understand there are technical limitations that prevent what I'm
>> describing right now, but it drives me nuts that these are hand-waved
>> away as social limitations ("That's not how CMake is meant to be used"
>> is just a bug report that no one is yet willing to fix).
>> SDL mailing list
>> SDL at lists.libsdl.org
> SDL mailing list
> SDL at lists.libsdl.org
Author of DarkPlaces Quake1 engine - http://icculus.org/twilight/darkplaces
Co-designer of Nexuiz - http://alientrap.org/nexuiz
"War does not prove who is right, it proves who is left." - Unknown
"Any sufficiently advanced technology is indistinguishable from a rigged demo." - James Klass
"A game is a series of interesting choices." - Sid Meier
More information about the SDL