From b1dfd65940f6913ebe59d1da4de7a4a37103800b Mon Sep 17 00:00:00 2001 From: Neal Gompa Date: Sun, 13 Nov 2016 16:09:23 -0500 Subject: [PATCH] Fix cross-compiling command and add CI clause for MinGW --- .gitlab-ci.yml | 12 ++++++++++++ CMakeLists.txt | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index dde4c21..6ff0aac 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -31,3 +31,15 @@ build_clang: - ./clang-build tags: - shared + +build_mingw32: + stage: build + script: + - dnf --quiet --assumeyes install mingw32-gcc mingw32-gcc-c++ mingw32-binutils + - export PATH=/usr/i686-w64-mingw32/bin:$PATH; mkdir -p i686-w64-mingw32 mingw32-build; cd i686-w64-mingw32; cmake .. -DCMAKE_TOOLCHAIN_FILE=/usr/share/mingw/toolchain-mingw32.cmake -DLUGARU_INSTALL_PREFIX=/builds/osslugaru/lugaru/mingw32-build; make -j4; make install + artifacts: + expire_in: 7d + paths: + - ./mingw32-build + tags: + - shared diff --git a/CMakeLists.txt b/CMakeLists.txt index 96d95b6..ae480d1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -138,7 +138,7 @@ endif(MSVC) if(WIN32) if(CMAKE_CROSSCOMPILING) ADD_CUSTOM_COMMAND( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lugaru_resource.obj - COMMAND i686-pc-mingw32-windres + COMMAND i686-w64-mingw32-windres -I${SRCDIR}/win-res -o ${CMAKE_CURRENT_BINARY_DIR}/lugaru_resource.obj -i${SRCDIR}/win-res/Lugaru.rc -- 2.39.5