interface: Fix macOS build (#485)

* Compile macOS interface with clang

* Fix OpenGL dependency on macOS
This commit is contained in:
tech-ticks 2022-03-31 02:21:00 +02:00 committed by GitHub
parent 599c981481
commit 1cec82613b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 7 deletions

View File

@ -44,14 +44,14 @@ jobs:
cd desmume/src/frontend/interface/
meson build
env:
CC: gcc-10
CXX: g++-10
CC: clang
CXX: clang++
- name: Build - ninja
run: ninja -C desmume/src/frontend/interface/build
env:
CC: gcc-10
CXX: g++-10
CC: clang
CXX: clang++
- name: Upload artificat
uses: actions/upload-artifact@v2

View File

@ -40,6 +40,11 @@ else
have_jit = false
endif
# Clang refuses to compile with this warning
if meson.get_compiler('cpp').get_id() == 'clang'
add_global_arguments('-Wno-c++11-narrowing', language: ['c', 'cpp'])
endif
includes = include_directories(
'../../../src',
'../../../src/libretro-common/include',
@ -168,7 +173,9 @@ if have_jit
]
endif
if dep_gl.found()
if host_machine.system() == 'darwin'
dependencies += dependency('appleframeworks', modules: 'OpenGL')
elif dep_gl.found()
dependencies += dep_gl
libdesmume_src += [
'../../OGLRender.cpp',

View File

@ -18,8 +18,13 @@
#ifndef WIN32
#include <AL/al.h>
#include <AL/alc.h>
#ifdef __APPLE__
#include <OpenAL/al.h>
#include <OpenAL/alc.h>
#else
#include <AL/al.h>
#include <AL/alc.h>
#endif
#include "types.h"
#include "mic.h"