docs/README-cmake.md
author Ryan C. Gordon <icculus@icculus.org>
Mon, 29 Oct 2018 20:00:03 -0400
changeset 12369 68c87b40b434
parent 10486 5bf595c48fd4
permissions -rw-r--r--
winmain: Don't use SDL_malloc (or SDL_stack_alloc, which might be malloc).

Otherwise, we are using the allocator before the app can set up its own hooks.

Now we use VirtualAlloc, and WideCharToMultiByte (because SDL_iconv uses
SDL_malloc, too!) to get ready to call into SDL_main.

This also makes console_wmain() call into the same routines as everything
else, so we don't have to deal with those allocations, too. Hopefully we
end up with the same results from GetCommandLine() as we do in wargv.

Fixes Bugzilla #4340.
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.