From 981d01134b15c1d8214d9a7e5944879852588063 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Thu, 20 Oct 2022 20:11:19 -0700 Subject: [PATCH] macOS: Fix modern build with libepoxy (fixes #2700) --- CHANGES | 1 + CMakeLists.txt | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 98658856c..25e4f5efe 100644 --- a/CHANGES +++ b/CHANGES @@ -12,6 +12,7 @@ Other fixes: Misc: - GB Serialize: Add missing savestate support for MBC6 and NT (newer) - macOS: Add category to plist (closes mgba.io/i/2691) + - macOS: Fix modern build with libepoxy (fixes mgba.io/i/2700) - Qt: Keep track of current pslette preset name (fixes mgba.io/i/2680) 0.10.0: (2022-10-11) diff --git a/CMakeLists.txt b/CMakeLists.txt index ce8e4d687..a00e93371 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -718,8 +718,12 @@ if (USE_LZMA) endif() if(USE_EPOXY) - list(APPEND FEATURE_SRC ${CMAKE_CURRENT_SOURCE_DIR}/src/platform/opengl/gl.c ${CMAKE_CURRENT_SOURCE_DIR}/src/platform/opengl/gles2.c) - list(APPEND FEATURE_DEFINES BUILD_GL BUILD_GLES2 BUILD_GLES3) + if(NOT APPLE OR NOT MACOSX_SDK VERSION_GREATER 10.14) + list(APPEND FEATURE_SRC ${CMAKE_CURRENT_SOURCE_DIR}/src/platform/opengl/gl.c) + list(APPEND FEATURE_DEFINES BUILD_GL) + endif() + list(APPEND FEATURE_SRC ${CMAKE_CURRENT_SOURCE_DIR}/src/platform/opengl/gles2.c) + list(APPEND FEATURE_DEFINES BUILD_GLES2 BUILD_GLES3) list(APPEND FEATURES EPOXY) include_directories(AFTER ${EPOXY_INCLUDE_DIRS}) link_directories(${EPOXY_LIBRARY_DIRS})