From 6af4dcd4074989cbb7cb57f37fbb31336a826e45 Mon Sep 17 00:00:00 2001 From: Inori Date: Wed, 31 Jul 2019 10:00:06 -0400 Subject: [PATCH] Don't include alext.h when using Apple-provided OpenAL --- src/eventthread.cpp | 2 ++ src/meson.build | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/eventthread.cpp b/src/eventthread.cpp index 6ffdb295..790078c5 100644 --- a/src/eventthread.cpp +++ b/src/eventthread.cpp @@ -31,7 +31,9 @@ #include #include +#ifndef USE_MAC_OPENAL #include +#endif #include "sharedstate.h" #include "graphics.h" diff --git a/src/meson.build b/src/meson.build index 73dbc40d..5231123d 100644 --- a/src/meson.build +++ b/src/meson.build @@ -15,6 +15,10 @@ main_dependencies = [sigcxx, openal, boost, zlib, pixman, physfs, vorbisfile, sd if host_system == 'darwin' main_dependencies += meson.get_compiler('cpp').find_library('iconv') + + if openal.type_name() != 'pkgconfig' + add_project_arguments('-DUSE_MAC_OPENAL', language: 'cpp') + endif endif if get_option('shared_fluid') == true @@ -132,4 +136,4 @@ main_source = files( 'fluid-fun.cpp' ) -main = [main_source, main_headers] \ No newline at end of file +main = [main_source, main_headers]