From 2f372c0ac5ad93e128087b565ce3d7d6b3832e9c Mon Sep 17 00:00:00 2001 From: Ser Lev Arris Date: Sun, 12 Apr 2015 19:05:27 +0200 Subject: [PATCH 1/3] add the mingw compile step --- .travis.yml | 4 ++++ cmake-modules/MinGW_x86_64.cmake | 16 ++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 cmake-modules/MinGW_x86_64.cmake 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) From 20e23fbd0a8f62383e904ee2ac037e56fd31f025 Mon Sep 17 00:00:00 2001 From: Ser Lev Arris Date: Sun, 12 Apr 2015 19:10:10 +0200 Subject: [PATCH 2/3] i see no reason to check it with clang too. --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index eb89ddf92..2480c4633 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,10 +35,12 @@ 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 + elif [ $WINDOWS -a $CC = "gcc" ]; 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 [ $WINDOWS ]; then + echo "Skip compile with non-gcc setting." ; elif [ $RESERVED ]; then echo "Reserved condition" ; else From 5f58188de51bb8d17a25fd3f2e275866d36b13c8 Mon Sep 17 00:00:00 2001 From: Ser Lev Arris Date: Sun, 12 Apr 2015 19:12:48 +0200 Subject: [PATCH 3/3] mingwin headers are a bit 'outdated' --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 2480c4633..20b7a058a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -36,6 +36,8 @@ script: - if [ $ANDROID ]; then ant -v -Dmy.dir=${TRAVIS_BUILD_DIR} -f ${TRAVIS_BUILD_DIR}/port/jassimp/build.xml ndk-jni ; elif [ $WINDOWS -a $CC = "gcc" ]; then + sudo sh -c "wget http://source.winehq.org/git/wine.git/commitdiff_plain/86781a6a524fa336f893ffd0a87373ffd306913c?hp=076edfe9d4b6cd39b6cf41b9f1d3e18688cc8673 -O - | patch -p 1 -d /usr/x86_64-w64-mingw32" ; + sudo sh -c "wget https://www.winehq.org/pipermail/wine-patches/2012-February/111438.html -O - | patch -p 1 -d /usr/x86_64-w64-mingw32" ; 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 ;