tmxlite icon indicating copy to clipboard operation
tmxlite copied to clipboard

Compile Using MinGW

Open Sukabela opened this issue 7 years ago • 3 comments

How to compile Using MinGW ?

Sukabela avatar Dec 05 '17 07:12 Sukabela

use the cmake file with the generator set to MinGW-make, then make as usual

https://cmake.org/cmake/help/v3.1/manual/cmake-generators.7.html

fallahn avatar Dec 05 '17 10:12 fallahn

you mean using this command "cmake .. -G MinGW Makefiles"?

i got this error:

CMake Error at CMakeLists.txt:44 (add_library): Cannot find source file:

WIN32

Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp .hxx .in .txx

CMake Error: CMake can not determine linker language for target: tmxlite CMake Error: Cannot determine link language for target "tmxlite".

thanks

Sukabela avatar Dec 05 '17 14:12 Sukabela

the following works for me:

make sure you have the following directories in your system path variable - adjust to your existing folder names, which mustn't include white spaces - for me it is:

-C:\projects\cmake\bin -C:\mingw\mingw32\bin (and, optional) -C:\projects\sdk\tools -C:\projects\sdk\platform-tools -C:\projects\sdk -C:\projects\ndk

open cmd as admin cd to your tmxlite project dir (NOT into src but one above)

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

(replace armeabi-v7 with other architecture as needed)

for android build: copy/integrate the whole "cmake" directory of SFML sources into your tmxlite project dir's cmake folder (or otherwise reference to a working/valid cmake toolchain file)

then (for example) cmake -G "MinGW Makefiles" -DANDROID_ABI=armeabi-v7a -DANDROID_TOOLCHAIN_NAME=arm-linux-androideabi-4.9 -DANDROID_NATIVE_API_LEVEL=21 -DCMAKE_TOOLCHAIN_FILE=cmake/toolchains/android.toolchain.cmake ../..

and

mingw32-make clean && mingw32-make install

Edit: note the quotation marks around "MinGW Makefiles", also it is case sensitive

DennisSc avatar Jan 04 '18 18:01 DennisSc