Skip to content

Commit c5176af

Browse files
committed
add mac build fixes from #170
1 parent 8993e9d commit c5176af

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ If you want to change the buildtype afterwards, you can use `meson configure --b
123123
- `Xcode` or `Command Line Tools for Xcode` (if you need to, you can also generate an xcode project from meson using the `--backend=xcode` option on setup)
124124

125125
**Homebrew (macOS):**
126-
`brew install pkg-config sdl2 minizip lz4 flac luajit lua libpng tbb gcc@13 ninja meson dylibbundler`
126+
`brew install pkg-config sdl2 sdl2_image minizip lz4 flac luajit lua libpng tbb gcc@13 ninja meson dylibbundler`
127127

128128
**Arch Linux:**
129129
`sudo pacman -S sdl2 sdl2_image tbb flac luajit lua minizip lz4 libpng meson ninja base-devel`

Source/Managers/WindowMan.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ void WindowMan::Initialize() {
101101

102102
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
103103
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
104-
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 3);
105-
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
104+
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 1);
105+
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_COMPATIBILITY);
106106
CreatePrimaryWindow();
107107
InitializeOpenGL();
108108
CreateBackBufferTexture();

meson.build

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,10 +199,11 @@ if host_machine.system() in ['linux','darwin']
199199
dependency('liblz4'),
200200
dependency('libpng'),
201201
dependency('tbb'),
202-
dependency('gl')
203202
]
204-
if host_machine.system()=='darwin'
205-
deps += dependency('appleframeworks', modules: ['Foundation'])
203+
if host_machine.system() == 'linux'
204+
deps += dependency('gl')
205+
elif host_machine.system()=='darwin'
206+
deps += dependency('appleframeworks', modules: ['Foundation', 'OpenGL'])
206207
endif
207208
elif host_machine.system() == 'windows'
208209
sdl2 = subproject('SDL2-2.26.3')

0 commit comments

Comments
 (0)