mirror of
https://github.com/Perlmint/glew-cmake.git
synced 2025-02-21 07:59:22 +00:00
Build test with mingw
This commit is contained in:
parent
78f10dd0e0
commit
f61e323584
23
.github/workflows/cmake.yml
vendored
23
.github/workflows/cmake.yml
vendored
@ -132,6 +132,29 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: test -e lib/libGLEW.a
|
run: test -e lib/libGLEW.a
|
||||||
|
|
||||||
|
build_mingw:
|
||||||
|
# The CMake configure and build commands are platform agnostic and should work equally
|
||||||
|
# well on Windows or Mac. You can convert this to a matrix build if you need
|
||||||
|
# cross-platform coverage.
|
||||||
|
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container: ubuntu:18.04
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: apt update && apt install -y cmake g++-mingw-w64-x86-64 make libgl1-mesa-dev libx11-dev libxext-dev
|
||||||
|
|
||||||
|
- name: Configure CMake
|
||||||
|
shell: bash
|
||||||
|
run: cmake . -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_TOOLCHAIN_FILE="$GITHUB_WORKSPACE/glew-cmake/mingw.cmake"
|
||||||
|
|
||||||
|
- name: Build test
|
||||||
|
shell: bash
|
||||||
|
run: cmake --build .
|
||||||
|
|
||||||
|
|
||||||
build_mac:
|
build_mac:
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
|
|
||||||
|
16
glew-cmake/mingw.cmake
Normal file
16
glew-cmake/mingw.cmake
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
set(CMAKE_SYSTEM_NAME Windows)
|
||||||
|
set(TOOLCHAIN_PREFIX x86_64-w64-mingw32)
|
||||||
|
|
||||||
|
# cross compilers to use for C, C++ and Fortran
|
||||||
|
set(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}-gcc)
|
||||||
|
set(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}-g++)
|
||||||
|
set(CMAKE_RC_COMPILER ${TOOLCHAIN_PREFIX}-windres)
|
||||||
|
|
||||||
|
# target environment on the build host system
|
||||||
|
set(CMAKE_FIND_ROOT_PATH /usr/${TOOLCHAIN_PREFIX})
|
||||||
|
|
||||||
|
# modify default behavior of FIND_XXX() commands
|
||||||
|
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…
Reference in New Issue
Block a user