diff --git a/CMakeLists.txt b/CMakeLists.txt index b22f65503..07c85f387 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,6 +35,11 @@ if(LINUX OR ANDROID) option(USE_EGL "Support EGL OpenGL context creation" ON) endif() +# Force EGL when using Wayland +if(USE_WAYLAND) + set(USE_EGL ON) +endif() + # When we're building for libretro, everything else is invalid because of PIC. if(ANDROID OR BUILD_LIBRETRO_CORE) if(BUILD_SDL_FRONTEND) @@ -56,6 +61,9 @@ if(ANDROID OR BUILD_LIBRETRO_CORE) if(USE_X11) set(USE_X11 OFF) endif() + if(USE_WAYLAND) + set(USE_WAYLAND OFF) + endif() if(BUILD_LIBRETRO_CORE AND USE_EGL) set(USE_EGL OFF) endif()