M Cross Evironment (MXE) provides an easy to set up cross compiling environment which produces static windows binaries. You can use MXE to build SuperTux.
git clone -b stable
https://github.com/mxe/mxe.git
The location you installed it into will be called mxe_path later on.
make boost curl gcc gettext glew openal physfs sdl sdl_image sdl_mixer ogg vorbis w32api
ln -s windres.exe ./i686-pc-mingw32-windres
see also Bug 846
mkdir build
cd build
ccmake .. -DCMAKE_TOOLCHAIN_FILE=/
mxe_path
/usr/i686-pc-mingw32/share/cmake/mxe-conf.cmake
CMAKE_CXX_FLAGS |
-DGLEW_STATIC=1 -DAL_LIBTYPE_STATIC=1 |
CMAKE_CXX_STANDARD_LIBRARIES |
-lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lcurl -lidn -lintl -lwldap32 -lgnutls -lhogweed -lgmp -lnettle -lssh2 -lgcrypt -lgpg-error -lws2_32 -lOpenAL32 -luuid -lSDL_image -lmingw32 -lSDLmain -lSDL -liconv -lm -luser32 -lgdi32 -lwinmm -ldxguid -ltiff -llzma -ljpeg -lpng15 -lz -lGLEW -lopengl32 |
SDLIMAGE_INCLUDE_DIR |
/ mxe_path /usr/i686-pc-mingw32/include/SDL |
CMAKE_TOOLCHAIN)FILE
not being used in the project: just ignore ([e]).PATH=$PATH:/
mxe_path
/usr/bin make
and watch it compile. If you forgot the PATH
statement then cmake will complain about not finding windres.exe
.supertux2.exe
does not depend on any dlls.