docs/README-cmake.md
author Sam Lantinga
Sun, 13 Aug 2017 18:12:06 -0700
changeset 11263 f85618f8ba81
parent 10486 5bf595c48fd4
child 13087 76ff33e9a6b4
permissions -rw-r--r--
Fixed bug 2812 - Make libSDL2main.a usable on Android via a dummy symbol

Jonas Kulla

This eliminates the need to manually compile in SDL_main_android.c.
Instead, add "-lSDL2main -Wl,-u,SDL_main_dummy" when linking.

I don't know how the nkd-build process works, but unless it was
for some reason linking libSDL2main.a it should be unaffected.
slouken@10486
     1
CMake
gabomdq@9023
     2
================================================================================
slouken@10486
     3
(www.cmake.org)
gabomdq@9023
     4
gabomdq@9023
     5
SDL's build system was traditionally based on autotools. Over time, this
gabomdq@9023
     6
approach has suffered from several issues across the different supported 
gabomdq@9023
     7
platforms.
gabomdq@9023
     8
To solve these problems, a new build system based on CMake is under development.
gabomdq@9023
     9
It works in parallel to the legacy system, so users can experiment with it
gabomdq@9023
    10
without complication.
gabomdq@9023
    11
While still experimental, the build system should be usable on the following
gabomdq@9023
    12
platforms:
philipp@9066
    13
philipp@9066
    14
* FreeBSD
philipp@9066
    15
* Linux
philipp@9066
    16
* VS.NET 2010
philipp@9066
    17
* MinGW and Msys
philipp@9066
    18
* OS X with support for XCode
philipp@9066
    19
philipp@9066
    20
gabomdq@9023
    21
================================================================================
gabomdq@9023
    22
Usage
gabomdq@9023
    23
================================================================================
gabomdq@9023
    24
gabomdq@9023
    25
Assuming the source for SDL is located at ~/sdl
gabomdq@9023
    26
philipp@9066
    27
    cd ~
philipp@9066
    28
    mkdir build
philipp@9066
    29
    cd build
philipp@9066
    30
    cmake ../sdl
gabomdq@9023
    31
gabomdq@9023
    32
This will build the static and dynamic versions of SDL in the ~/build directory.