diff --git a/.github/workflows/build_interface.yml b/.github/workflows/build_interface.yml index d7c33ebf9..405317124 100644 --- a/.github/workflows/build_interface.yml +++ b/.github/workflows/build_interface.yml @@ -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 diff --git a/desmume/src/frontend/interface/meson.build b/desmume/src/frontend/interface/meson.build index 821e5d207..1a6328a1a 100644 --- a/desmume/src/frontend/interface/meson.build +++ b/desmume/src/frontend/interface/meson.build @@ -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', diff --git a/desmume/src/frontend/posix/shared/mic_openal.cpp b/desmume/src/frontend/posix/shared/mic_openal.cpp index e181ef2a8..5adff51d1 100644 --- a/desmume/src/frontend/posix/shared/mic_openal.cpp +++ b/desmume/src/frontend/posix/shared/mic_openal.cpp @@ -18,8 +18,13 @@ #ifndef WIN32 -#include -#include +#ifdef __APPLE__ + #include + #include +#else + #include + #include +#endif #include "types.h" #include "mic.h"