diff --git a/.travis.yml b/.travis.yml index 0630cc268..eb89ddf92 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,6 +35,10 @@ install: script: - if [ $ANDROID ]; then ant -v -Dmy.dir=${TRAVIS_BUILD_DIR} -f ${TRAVIS_BUILD_DIR}/port/jassimp/build.xml ndk-jni ; + elif [ $WINDOWS ]; then + cmake -G "Unix Makefiles" -DASSIMP_NO_EXPORT=$TRAVIS_NO_EXPORT -DBUILD_SHARED_LIBS=$SHARED_BUILD -DCMAKE_TOOLCHAIN_FILE=cmake-modules/MinGW_x86_64.cmake ; + cmake --build . ; + make install ; elif [ $RESERVED ]; then echo "Reserved condition" ; else diff --git a/cmake-modules/MinGW_x86_64.cmake b/cmake-modules/MinGW_x86_64.cmake new file mode 100644 index 000000000..d5c1f1501 --- /dev/null +++ b/cmake-modules/MinGW_x86_64.cmake @@ -0,0 +1,16 @@ +# this one sets internal to crosscompile (in theory) +SET(CMAKE_SYSTEM_NAME Windows) + +# the minimalistic settings +SET(CMAKE_C_COMPILER "/usr/bin/x86_64-w64-mingw32-gcc") +SET(CMAKE_CXX_COMPILER "/usr/bin/x86_64-w64-mingw32-g++") +SET(CMAKE_RC_COMPILER "/usr/bin/x86_64-w64-mingw32-windres") + +# where is the target (so called staging) environment +SET(CMAKE_FIND_ROOT_PATH /usr/x86_64-w64-mingw32) + +# search for programs in the build host directories (default BOTH) +#SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) +# for libraries and headers in the target directories +SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) +SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)