README.cmake
author Sam Lantinga <slouken@libsdl.org>
Tue, 02 Apr 2013 07:57:37 -0700
changeset 7045 4be2c24b7de1
parent 6674 45a21e50ba5e
permissions -rw-r--r--
Fixed bug 1780 - SDL_RWFromFile() sets an error on Android although a valid SDL_RWops pointer is returned.

Philipp Wiesemann

SDL_RWFromFile() sets an error to be queried with SDL_GetError() on Android although a valid SDL_RWops pointer is returned.

This happens if the fallback implemented in SDL_android.cpp is used to load compressed assets (see README.android in section "Loading assets") and results in a message like "java.io.FileNotFoundException: This file can not be opened as a file descriptor; it is probably compressed". I think this is confusing and not needed because the loading works as expected.

I attached a patch which changes SDL_android.cpp to not set an error if compressed assets are loaded. In this case also no Exception is queried and no additional string are created.
gabomdq@6674
     1
================================================================================
gabomdq@6674
     2
CMake build system for SDL (www.cmake.org)
gabomdq@6674
     3
================================================================================
gabomdq@6674
     4
gabomdq@6674
     5
SDL's build system was traditionally based on autotools. Over time, this
gabomdq@6674
     6
approach has suffered from several issues across the different supported 
gabomdq@6674
     7
platforms.
gabomdq@6674
     8
To solve these problems, a new build system based on CMake is under development.
gabomdq@6674
     9
It works in parallel to the legacy system, so users can experiment with it
gabomdq@6674
    10
without complication.
gabomdq@6674
    11
While still experimental, the build system should be usable on the following
gabomdq@6674
    12
platforms:
gabomdq@6674
    13
    
gabomdq@6674
    14
    * FreeBSD
gabomdq@6674
    15
    * Linux
gabomdq@6674
    16
    * VS.NET 2010
gabomdq@6674
    17
    * MinGW and Msys
gabomdq@6674
    18
    * OS X with support for XCode
gabomdq@6674
    19
    
gabomdq@6674
    20
================================================================================
gabomdq@6674
    21
Usage
gabomdq@6674
    22
================================================================================
gabomdq@6674
    23
gabomdq@6674
    24
Assuming the source for SDL is located at ~/sdl
gabomdq@6674
    25
gabomdq@6674
    26
cd ~
gabomdq@6674
    27
mkdir build
gabomdq@6674
    28
cd build
gabomdq@6674
    29
cmake ../sdl
gabomdq@6674
    30
gabomdq@6674
    31
This will build the static and dynamic versions of SDL in the ~/build directory.