[SDL] CMake gurus...

Gabriele Greco gabriele.greco at darts.it
Mon Mar 25 07:31:03 PDT 2013


Then run make && sudo make install on Linux and OSX , or open the geneated
> Visual Studio project on Windows.
>
> Is that so complicated? If you need extra parameters t is not harder than
> if you were using a configure script.
>
> I agree with all of the above comments that any users of the library who
> struggle with that process probeably should just be using pre-built
> binaries.
>
> I personally love CMake and find it relatively easy to use, so perhaps my
> point of view is somewhat biased, but other than providing pre-generated
> projects I've seen no mention of anything in this thread that CMake can't
> do.
>

I think we are discussing about a complexity that it exists, and it's
minimal, but that let you do things that at the moment on
XCode/VisualStudio projects cannot do and never will.

I'm talking about "adapting" the build to your architecture (availability
of certain subsystems, for instance X11 on OSX or standard headers on
recent visual studios...), at the moment there is a single SDL_config_osx /
SDL_config_win32 that dictates how SDL must configure on these archs, using
CMake will make these platforms use the "real" SDL_config.h

Developers that do not want to install CMake can use the prebuilt DLL +
headers, that, as said multiple times in this thread, is the usual approach
a win32 developer will try first.

Another plus of CMake is how easy it is to cross-build, for instance for a
project I'm working on with two simple toolchain files I can build on the
same machine for Linux, OSX and Win32. The CMakelists.txt (I agree is an
ugly name, Ryan) is the same if you build on the target or through a
crosscompiler.

Remember also that once you know a bit CMake, write a CMakeLists.txt or a
macro file is far easier that working with autotools, and CMake files are
also smaller and easier to be read than the autoconf scripts.

-- 
Bye,
 Gabry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20130325/95692dc1/attachment-0009.htm>


More information about the SDL mailing list