diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7fefa4008..0ec67d36d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -166,7 +166,7 @@ jobs: - name: Install deps run: | brew update - brew install cmake libpng jpeg + brew install cmake libpng jpeg sdl2 - name: Build run: | diff --git a/source/Irrlicht/CMakeLists.txt b/source/Irrlicht/CMakeLists.txt index 631aa1487..378d30180 100644 --- a/source/Irrlicht/CMakeLists.txt +++ b/source/Irrlicht/CMakeLists.txt @@ -1,4 +1,4 @@ -if(NOT ANDROID AND NOT APPLE) +if(NOT ANDROID) set(DEFAULT_SDL2 ON) endif() @@ -88,7 +88,10 @@ if(WIN32) set(DEVICE "WINDOWS") elseif(APPLE) add_definitions(-D_IRR_OSX_PLATFORM_) - set(DEVICE "OSX") + if(NOT USE_SDL2) + message(FATAL_ERROR "SDL2 is required on macOS") + endif() + set(DEVICE "SDL") elseif(ANDROID) add_definitions(-D_IRR_ANDROID_PLATFORM_) if(USE_SDL2) @@ -191,7 +194,6 @@ if(ENABLE_OPENGL) add_definitions(-D_IRR_COMPILE_WITH_GLX_MANAGER_) elseif(DEVICE STREQUAL "OSX") add_definitions(-D_IRR_COMPILE_WITH_NSOGL_MANAGER_) - # FIXME broken due to missing glext.h now! endif() endif() diff --git a/source/Irrlicht/COpenGLCommon.h b/source/Irrlicht/COpenGLCommon.h index 50720270d..b1bd845e1 100644 --- a/source/Irrlicht/COpenGLCommon.h +++ b/source/Irrlicht/COpenGLCommon.h @@ -13,16 +13,14 @@ #include #include #include -#elif defined(_IRR_COMPILE_WITH_OSX_DEVICE_) - #define GL_GLEXT_LEGACY 1 - #include - #include #elif defined(_IRR_COMPILE_WITH_SDL_DEVICE_) && !defined(_IRR_COMPILE_WITH_X11_DEVICE_) #define GL_GLEXT_LEGACY 1 #include #include // The SDL2 header doesn't cut it for extensions #include +#elif defined(_IRR_COMPILE_WITH_OSX_DEVICE_) + #error Not supposed to get here #else #define GL_GLEXT_LEGACY 1 #define GLX_GLXEXT_LEGACY 1