aboutsummaryrefslogtreecommitdiff
path: root/src/frontend
diff options
context:
space:
mode:
Diffstat (limited to 'src/frontend')
-rw-r--r--src/frontend/duckstation/gl/context.cpp4
-rw-r--r--src/frontend/qt_sdl/CMakeLists.txt34
2 files changed, 26 insertions, 12 deletions
diff --git a/src/frontend/duckstation/gl/context.cpp b/src/frontend/duckstation/gl/context.cpp
index 9f21cd6..a0a4183 100644
--- a/src/frontend/duckstation/gl/context.cpp
+++ b/src/frontend/duckstation/gl/context.cpp
@@ -15,7 +15,9 @@ Log_SetChannel(GL::Context);
#elif defined(__APPLE__)
#include "context_agl.h"
#else
+#ifdef WAYLAND_ENABLED
#include "context_egl_wayland.h"
+#endif
#include "context_egl_x11.h"
#include "context_glx.h"
#endif
@@ -80,9 +82,11 @@ std::unique_ptr<GL::Context> Context::Create(const WindowInfo& wi, const Version
context = ContextGLX::Create(wi, versions_to_try, num_versions_to_try);
}
+#ifdef WAYLAND_ENABLED
if (wi.type == WindowInfo::Type::Wayland)
context = ContextEGLWayland::Create(wi, versions_to_try, num_versions_to_try);
#endif
+#endif
if (!context)
return nullptr;
diff --git a/src/frontend/qt_sdl/CMakeLists.txt b/src/frontend/qt_sdl/CMakeLists.txt
index c74ec47..0387c58 100644
--- a/src/frontend/qt_sdl/CMakeLists.txt
+++ b/src/frontend/qt_sdl/CMakeLists.txt
@@ -14,11 +14,11 @@ set(SOURCES_QT_SDL
InputConfig/MapButton.h
InputConfig/resources/ds.qrc
VideoSettingsDialog.cpp
- CameraSettingsDialog.cpp
+ CameraSettingsDialog.cpp
AudioSettingsDialog.cpp
FirmwareSettingsDialog.cpp
PathSettingsDialog.cpp
- MPSettingsDialog.cpp
+ MPSettingsDialog.cpp
WifiSettingsDialog.cpp
InterfaceSettingsDialog.cpp
ROMInfoDialog.cpp
@@ -27,15 +27,15 @@ set(SOURCES_QT_SDL
Input.cpp
LAN_PCap.cpp
LAN_Socket.cpp
- LocalMP.cpp
+ LocalMP.cpp
OSD.cpp
OSD_shaders.h
font.h
Platform.cpp
QPathInput.h
ROMManager.cpp
- SaveManager.cpp
- CameraManager.cpp
+ SaveManager.cpp
+ CameraManager.cpp
ArchiveUtil.h
ArchiveUtil.cpp
@@ -106,20 +106,30 @@ elseif (APPLE)
../duckstation/gl/context_agl.mm
)
else()
- # we only need ECM for Wayland
- # so we only require it from here
- find_package(ECM REQUIRED NO_MODULE)
- list(APPEND CMAKE_MODULE_PATH "${ECM_MODULE_PATH}")
-
find_package(X11 REQUIRED)
find_package(EGL REQUIRED)
- find_package(Wayland REQUIRED Client)
+
+ option(ENABLE_WAYLAND "Enable Wayland support" ON)
+
+ if (ENABLE_WAYLAND)
+ # we only need ECM for Wayland
+ # so we only require it from here
+ find_package(ECM REQUIRED NO_MODULE)
+ list(APPEND CMAKE_MODULE_PATH "${ECM_MODULE_PATH}")
+
+ find_package(Wayland REQUIRED Client)
+
+ target_compile_definitions(melonDS PRIVATE WAYLAND_ENABLED)
+
+ target_sources(melonDS PRIVATE
+ ../duckstation/gl/context_egl_wayland.cpp
+ )
+ endif()
target_sources(melonDS PRIVATE
../duckstation/gl/context_egl.cpp
../duckstation/gl/context_egl_x11.cpp
../duckstation/gl/context_glx.cpp
- ../duckstation/gl/context_egl_wayland.cpp
../duckstation/gl/x11_window.cpp
../glad/glad_egl.c