From 3bcb2e5ff2743adade9323f6ccaff714ace36875 Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Wed, 2 Jan 2019 05:37:08 -0600 Subject: enable cmake mingw builds in travis --- scripts/i686-w64-mingw32.cmake | 8 ++++++++ scripts/travis | 19 +++++++++++++++++++ scripts/x86_64-w64-mingw32.cmake | 8 ++++++++ 3 files changed, 35 insertions(+) create mode 100644 scripts/i686-w64-mingw32.cmake create mode 100644 scripts/x86_64-w64-mingw32.cmake 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 @@ +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) + 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 else sudo apt-get update sudo apt-get install -y cmake ninja-build + cmake -GNinja .. ninja ninja test @@ -40,6 +41,9 @@ if [ "x$ARCH" = "xnative" ]; then ninja test fi else + sudo apt-get update + sudo apt-get install -y cmake ninja-build + CPU=i686 if [ "x$ARCH" = "xmingw64" ]; then CPU=x86_64 @@ -54,4 +58,19 @@ else ./configure --host=$CPU-w64-mingw32 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 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 @@ +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) + -- cgit v1.2.3-55-g6feb