diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index 51439d95c..bfaaa9a97 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -172,7 +172,7 @@ if(USE_WAYLAND) target_link_libraries(common PRIVATE Wayland::Egl) endif() -if(APPLE) +if(APPLE AND NOT BUILD_LIBRETRO_CORE) target_sources(common PRIVATE gl/context_agl.mm gl/context_agl.h diff --git a/src/common/gl/context.cpp b/src/common/gl/context.cpp index 9298045c6..3e5f5cecd 100644 --- a/src/common/gl/context.cpp +++ b/src/common/gl/context.cpp @@ -11,7 +11,7 @@ Log_SetChannel(GL::Context); #if defined(WIN32) #include "context_wgl.h" -#elif defined(__APPLE__) +#elif defined(__APPLE__) && !defined(LIBERTRO) #include "context_agl.h" #endif @@ -74,7 +74,7 @@ std::unique_ptr Context::Create(const WindowInfo& wi, const Version std::unique_ptr context; #if defined(WIN32) context = ContextWGL::Create(wi, versions_to_try, num_versions_to_try); -#elif defined(__APPLE__) +#elif defined(__APPLE__) && !defined(LIBRETRO) context = ContextAGL::Create(wi, versions_to_try, num_versions_to_try); #elif defined(ANDROID) #ifdef USE_EGL