-
Notifications
You must be signed in to change notification settings - Fork 53
/
Copy path.travis.yml
63 lines (60 loc) · 2.48 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
language: cpp
sudo: false
dist: trusty
matrix:
include:
- os: linux
compiler: gcc
env: BUILDMODE=cmake-mingw64_x64
addons:
apt:
packages:
- gcc-mingw-w64-base
- binutils-mingw-w64-x86-64
- g++-mingw-w64-x86-64
- gcc-mingw-w64-x86-64
- g++-mingw-w64
- mingw-w64-x86-64-dev
- os: linux
compiler: gcc
env: BUILDMODE=cmake-mingw64_i686
addons:
apt:
packages:
- gcc-mingw-w64-base
- binutils-mingw-w64-i686
- g++-mingw-w64-i686
- gcc-mingw-w64-i686
- mingw-w64-i686-dev
script:
- if [ "$BUILDMODE" = "cmake-mingw64_i686" ]; then echo "===> Building with cmake+mingw64_i686..." &&
cd "$TRAVIS_BUILD_DIR" &&
mkdir build &&
cd build &&
echo "SET(CMAKE_SYSTEM_NAME Windows)" > toolchain.cmake &&
echo "SET(CMAKE_C_COMPILER /usr/bin/i686-w64-mingw32-gcc)" >> toolchain.cmake &&
echo "SET(CMAKE_CXX_COMPILER /usr/bin/i686-w64-mingw32-g++)" >> toolchain.cmake &&
echo "SET(CMAKE_RC_COMPILER /usr/bin/i686-w64-mingw32-windres)" >> toolchain.cmake &&
echo "SET(CMAKE_FIND_ROOT_PATH /usr/i686-w64-mingw32)" >> toolchain.cmake &&
echo "SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)" >> toolchain.cmake &&
echo "SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)" >> toolchain.cmake &&
echo "SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)" >> toolchain.cmake &&
cmake -DCMAKE_TOOLCHAIN_FILE=toolchain.cmake .. &&
make &&
make install;
elif [ "$BUILDMODE" = "cmake-mingw64_x64" ]; then echo "===> Building with cmake+mingw64_x64..." &&
cd "$TRAVIS_BUILD_DIR" &&
mkdir build &&
cd build &&
echo "SET(CMAKE_SYSTEM_NAME Windows)" > toolchain.cmake &&
echo "SET(CMAKE_C_COMPILER /usr/bin/x86_64-w64-mingw32-gcc)" >> toolchain.cmake &&
echo "SET(CMAKE_CXX_COMPILER /usr/bin/x86_64-w64-mingw32-g++)" >> toolchain.cmake &&
echo "SET(CMAKE_RC_COMPILER /usr/bin/x86_64-w64-mingw32-windres)" >> toolchain.cmake &&
echo "SET(CMAKE_FIND_ROOT_PATH /usr/x86_64-w64-mingw32)" >> toolchain.cmake &&
echo "SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)" >> toolchain.cmake &&
echo "SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)" >> toolchain.cmake &&
echo "SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)" >> toolchain.cmake &&
cmake -DCMAKE_TOOLCHAIN_FILE=toolchain.cmake .. &&
make &&
make install;
fi