forked from Mirrorlandia_minetest/irrlicht
Enable SDL to compile on macOS
This commit is contained in:
parent
ee2467d622
commit
b349266855
14
.github/workflows/build.yml
vendored
14
.github/workflows/build.yml
vendored
@ -177,6 +177,20 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
./bin/OSX/AutomatedTest null
|
./bin/OSX/AutomatedTest null
|
||||||
|
|
||||||
|
macos-sdl:
|
||||||
|
runs-on: macos-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: Install deps
|
||||||
|
run: |
|
||||||
|
brew update
|
||||||
|
brew install cmake libpng jpeg sdl2
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
cmake . -DCMAKE_FIND_FRAMEWORK=LAST -DBUILD_EXAMPLES=1 -DUSE_SDL2=1
|
||||||
|
make -j3
|
||||||
|
|
||||||
msvc:
|
msvc:
|
||||||
name: VS 2019 ${{ matrix.config.arch }} ${{ matrix.sdl.label }}
|
name: VS 2019 ${{ matrix.config.arch }} ${{ matrix.sdl.label }}
|
||||||
runs-on: windows-2019
|
runs-on: windows-2019
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
#endif
|
#endif
|
||||||
#include <OpenGL/gl.h>
|
#include <OpenGL/gl.h>
|
||||||
#if defined(_IRR_OPENGL_USE_EXTPOINTER_)
|
#if defined(_IRR_OPENGL_USE_EXTPOINTER_)
|
||||||
#include <GL/glext.h>
|
#error glext.h missing on OSX
|
||||||
#endif
|
#endif
|
||||||
#elif defined(_IRR_COMPILE_WITH_SDL_DEVICE_) && !defined(_IRR_COMPILE_WITH_X11_DEVICE_)
|
#elif defined(_IRR_COMPILE_WITH_SDL_DEVICE_) && !defined(_IRR_COMPILE_WITH_X11_DEVICE_)
|
||||||
#if defined(_IRR_OPENGL_USE_EXTPOINTER_)
|
#if defined(_IRR_OPENGL_USE_EXTPOINTER_)
|
||||||
@ -34,8 +34,11 @@
|
|||||||
#include <SDL_video.h>
|
#include <SDL_video.h>
|
||||||
#include <SDL_opengl.h>
|
#include <SDL_opengl.h>
|
||||||
#if defined(_IRR_OPENGL_USE_EXTPOINTER_)
|
#if defined(_IRR_OPENGL_USE_EXTPOINTER_)
|
||||||
// The SDL2 header doesn't cut it for extensions
|
#ifdef __APPLE__
|
||||||
|
#include <SDL_opengl_glext.h>
|
||||||
|
#else
|
||||||
#include <GL/glext.h>
|
#include <GL/glext.h>
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#if defined(_IRR_OPENGL_USE_EXTPOINTER_)
|
#if defined(_IRR_OPENGL_USE_EXTPOINTER_)
|
||||||
|
Loading…
Reference in New Issue
Block a user