Skip to content

Commit

Permalink
Hide and simplify MinGW toolchain
Browse files Browse the repository at this point in the history
  • Loading branch information
nthirtyone committed Feb 27, 2024
1 parent ed549bc commit 3884550
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Expand Up @@ -53,7 +53,7 @@ jobs:
run: sudo apt update && sudo apt install -y cmake ninja-build g++-mingw-w64-${{matrix.arch.pkg}}

- name: Generate CMake
run: mkdir infoware/build && cd infoware/build && cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=../tools/${{matrix.arch.paths}}-w64-mingw32.cmake -G Ninja ..
run: mkdir infoware/build && cd infoware/build && cmake -DCMAKE_BUILD_TYPE=Release -DMINGW_ARCH=${{matrix.arch.paths}} -DCMAKE_TOOLCHAIN_FILE=../.github/workflows/mingw.cmake -G Ninja ..

- name: Build Project
run: cmake --build infoware/build
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/mingw.cmake
@@ -0,0 +1,13 @@
set(CMAKE_SYSTEM_NAME Windows)
set(CMAKE_SYSTEM_PROCESSOR ${MINGW_ARCH})
set(MINGW_TOOLCHAIN ${MINGW_ARCH}-w64-mingw32)

set(CMAKE_FIND_ROOT_PATH /usr/${MINGW_TOOLCHAIN})
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

set(CMAKE_C_COMPILER ${MINGW_TOOLCHAIN}-gcc)
set(CMAKE_CXX_COMPILER ${MINGW_TOOLCHAIN}-g++)
set(CMAKE_RC_COMPILER ${MINGW_TOOLCHAIN}-windres)
set(CMAKE_MC_COMPILER ${MINGW_TOOLCHAIN}-windmc)
14 changes: 0 additions & 14 deletions tools/i686-w64-mingw32.cmake

This file was deleted.

14 changes: 0 additions & 14 deletions tools/x86_64-w64-mingw32.cmake

This file was deleted.

0 comments on commit 3884550

Please sign in to comment.