sfml Compile SFML for Android on Windows 3. Compiling SFML


Example

Clone the SFML Repository from Github.

Enter following comands in a cmd window:

git clone https://github.com/SFML/SFML.git SFML

If you already downloaded SFML before you can just use the existing one.


Create some folders for the build-files

cd SFML
mkdir build && cd build
mkdir armeabi-v7a && cd armeabi-v7a

Generate MSYS Makefiles for armeabi-v7a with cmake

cmake -DANDROID_ABI=armeabi-v7a -DCMAKE_TOOLCHAIN_FILE=../../cmake/toolchains/android.toolchain.cmake ../.. -G "MSYS Makefiles"

You can exchange armeabi-v7a with other architectures as you like.


Compile SFML from the generated makefiles and install it to $(NDK)/sources folder.

For this action you probably need administrator privileges. (Run cmd.exe as admin)

make && make install

You can use make install for multiple architectures. It all uses one sfml tag in the $(NDK)/sources folder.