Add circleci mingw builder

This commit is contained in:
John Maguire 2019-11-14 20:58:55 +00:00
parent 8b765a5257
commit 3a13615b79
2 changed files with 36 additions and 0 deletions

View File

@ -478,6 +478,25 @@ jobs:
- copy_rpm_artifacts:
build: fedora-31
build_mingw:
docker:
- image: eu.gcr.io/clementine-data/mingw-w64:latest
environment:
PKG_CONFIG_PATH: /target/lib/pkgconfig
steps:
- checkout
- run:
name: CMake
working_directory: bin
command: >
cmake ..
-DCMAKE_TOOLCHAIN_FILE=../Toolchain-mingw32.cmake
-DCMAKE_BUILD_TYPE=Release
- run:
name: Make
working_directory: bin
command: make -j2
build_mac:
macos:
xcode: "11.0.0"

17
Toolchain-mingw32.cmake Normal file
View File

@ -0,0 +1,17 @@
# the name of the target operating system
SET(CMAKE_SYSTEM_NAME Windows)
# which compilers to use for C and C++
SET(CMAKE_C_COMPILER i686-w64-mingw32-gcc)
SET(CMAKE_CXX_COMPILER i686-w64-mingw32-g++)
SET(CMAKE_RC_COMPILER i686-w64-mingw32-windres)
# here is the target environment located
SET(CMAKE_FIND_ROOT_PATH /target )
# adjust the default behaviour of the FIND_XXX() commands:
# search headers and libraries in the target environment, search
# programs in the host environment
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)