enable cmake mingw builds in travis
This commit is contained in:
parent
c23f745179
commit
3bcb2e5ff2
8
scripts/i686-w64-mingw32.cmake
Normal file
8
scripts/i686-w64-mingw32.cmake
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
SET(CMAKE_SYSTEM_NAME Windows)
|
||||||
|
SET(CMAKE_C_COMPILER i686-w64-mingw32-gcc)
|
||||||
|
SET(CMAKE_CXX_COMPILER i686-w64-mingw32-g++)
|
||||||
|
SET(CMAKE_RC_COMPILER i686-w64-mingw32-windres)
|
||||||
|
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||||
|
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||||
|
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||||
|
|
@ -30,6 +30,7 @@ if [ "x$ARCH" = "xnative" ]; then
|
|||||||
else
|
else
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y cmake ninja-build
|
sudo apt-get install -y cmake ninja-build
|
||||||
|
|
||||||
cmake -GNinja ..
|
cmake -GNinja ..
|
||||||
ninja
|
ninja
|
||||||
ninja test
|
ninja test
|
||||||
@ -40,6 +41,9 @@ if [ "x$ARCH" = "xnative" ]; then
|
|||||||
ninja test
|
ninja test
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y cmake ninja-build
|
||||||
|
|
||||||
CPU=i686
|
CPU=i686
|
||||||
if [ "x$ARCH" = "xmingw64" ]; then
|
if [ "x$ARCH" = "xmingw64" ]; then
|
||||||
CPU=x86_64
|
CPU=x86_64
|
||||||
@ -54,4 +58,19 @@ else
|
|||||||
|
|
||||||
./configure --host=$CPU-w64-mingw32
|
./configure --host=$CPU-w64-mingw32
|
||||||
make -j
|
make -j
|
||||||
|
|
||||||
|
(
|
||||||
|
rm -fr build-static
|
||||||
|
mkdir build-static
|
||||||
|
cd build-static
|
||||||
|
cmake -GNinja -DCMAKE_TOOLCHAIN_FILE=../scripts/$CPU-w64-mingw32.cmake ..
|
||||||
|
ninja
|
||||||
|
)
|
||||||
|
(
|
||||||
|
rm -fr build-shared
|
||||||
|
mkdir build-shared
|
||||||
|
cd build-shared
|
||||||
|
cmake -GNinja -DCMAKE_TOOLCHAIN_FILE=../scripts/$CPU-w64-mingw32.cmake -DBUILD_SHARED_LIBS=ON ..
|
||||||
|
ninja
|
||||||
|
)
|
||||||
fi
|
fi
|
||||||
|
8
scripts/x86_64-w64-mingw32.cmake
Normal file
8
scripts/x86_64-w64-mingw32.cmake
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
SET(CMAKE_SYSTEM_NAME Windows)
|
||||||
|
SET(CMAKE_C_COMPILER x86_64-w64-mingw32-gcc)
|
||||||
|
SET(CMAKE_CXX_COMPILER x86_64-w64-mingw32-g++)
|
||||||
|
SET(CMAKE_RC_COMPILER x86_64-w64-mingw32-windres)
|
||||||
|
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||||
|
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||||
|
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user