aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrent Cook <busterb@gmail.com>2019-01-02 05:37:08 -0600
committerBrent Cook <busterb@gmail.com>2019-01-02 06:26:45 -0600
commit3bcb2e5ff2743adade9323f6ccaff714ace36875 (patch)
tree3cebf3c014ede16c856080235aa2e17a071b1f19
parentc23f745179fb9ce7543bc4507cea92c98c16b4dc (diff)
downloadportable-3bcb2e5ff2743adade9323f6ccaff714ace36875.tar.gz
portable-3bcb2e5ff2743adade9323f6ccaff714ace36875.tar.bz2
portable-3bcb2e5ff2743adade9323f6ccaff714ace36875.zip
enable cmake mingw builds in travis
-rw-r--r--scripts/i686-w64-mingw32.cmake8
-rwxr-xr-xscripts/travis19
-rw-r--r--scripts/x86_64-w64-mingw32.cmake8
3 files changed, 35 insertions, 0 deletions
diff --git a/scripts/i686-w64-mingw32.cmake b/scripts/i686-w64-mingw32.cmake
new file mode 100644
index 0000000..58efd58
--- /dev/null
+++ b/scripts/i686-w64-mingw32.cmake
@@ -0,0 +1,8 @@
1SET(CMAKE_SYSTEM_NAME Windows)
2SET(CMAKE_C_COMPILER i686-w64-mingw32-gcc)
3SET(CMAKE_CXX_COMPILER i686-w64-mingw32-g++)
4SET(CMAKE_RC_COMPILER i686-w64-mingw32-windres)
5set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
6set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
7set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
8
diff --git a/scripts/travis b/scripts/travis
index ea54aae..434f88c 100755
--- a/scripts/travis
+++ b/scripts/travis
@@ -30,6 +30,7 @@ if [ "x$ARCH" = "xnative" ]; then
30 else 30 else
31 sudo apt-get update 31 sudo apt-get update
32 sudo apt-get install -y cmake ninja-build 32 sudo apt-get install -y cmake ninja-build
33
33 cmake -GNinja .. 34 cmake -GNinja ..
34 ninja 35 ninja
35 ninja test 36 ninja test
@@ -40,6 +41,9 @@ if [ "x$ARCH" = "xnative" ]; then
40 ninja test 41 ninja test
41 fi 42 fi
42else 43else
44 sudo apt-get update
45 sudo apt-get install -y cmake ninja-build
46
43 CPU=i686 47 CPU=i686
44 if [ "x$ARCH" = "xmingw64" ]; then 48 if [ "x$ARCH" = "xmingw64" ]; then
45 CPU=x86_64 49 CPU=x86_64
@@ -54,4 +58,19 @@ else
54 58
55 ./configure --host=$CPU-w64-mingw32 59 ./configure --host=$CPU-w64-mingw32
56 make -j 60 make -j
61
62 (
63 rm -fr build-static
64 mkdir build-static
65 cd build-static
66 cmake -GNinja -DCMAKE_TOOLCHAIN_FILE=../scripts/$CPU-w64-mingw32.cmake ..
67 ninja
68 )
69 (
70 rm -fr build-shared
71 mkdir build-shared
72 cd build-shared
73 cmake -GNinja -DCMAKE_TOOLCHAIN_FILE=../scripts/$CPU-w64-mingw32.cmake -DBUILD_SHARED_LIBS=ON ..
74 ninja
75 )
57fi 76fi
diff --git a/scripts/x86_64-w64-mingw32.cmake b/scripts/x86_64-w64-mingw32.cmake
new file mode 100644
index 0000000..c52b606
--- /dev/null
+++ b/scripts/x86_64-w64-mingw32.cmake
@@ -0,0 +1,8 @@
1SET(CMAKE_SYSTEM_NAME Windows)
2SET(CMAKE_C_COMPILER x86_64-w64-mingw32-gcc)
3SET(CMAKE_CXX_COMPILER x86_64-w64-mingw32-g++)
4SET(CMAKE_RC_COMPILER x86_64-w64-mingw32-windres)
5set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
6set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
7set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
8