From 07af8553281906d7cc361ae13059c30e14bd6e4e Mon Sep 17 00:00:00 2001 From: Mariotaku Date: Thu, 24 Sep 2026 08:24:55 +0900 Subject: [PATCH] webos: require dlopen and dynamically loaded Wayland libpbnjson_c, libhelpers, the Wayland ABI fix library and Wayland are all loaded through SDL_LoadObject(), and the fallbacks for the older libwayland on webOS firmware only exist in the dynamic Wayland loader. Fail configure without dlopen or with Wayland linked directly. Co-Authored-By: Claude Opus 5.5 --- CMakeLists.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index ea0a7afd4f57f..ba798a88c955b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1436,6 +1436,12 @@ if(UNIX OR APPLE) endif() endif() +# libpbnjson_c, libhelpers, the Wayland ABI fix library and Wayland itself are +# all loaded through SDL_LoadObject() on webOS. +if(WEBOS AND NOT HAVE_DLOPEN) + message(FATAL_ERROR "webOS requires dlopen, but dlopen was not found.") +endif() + if(UNIX OR APPLE OR HAIKU OR RISCOS) CheckO_CLOEXEC() endif() @@ -1883,6 +1889,16 @@ elseif(UNIX AND NOT APPLE AND NOT RISCOS AND NOT HAIKU) CheckOpenGL() CheckOpenGLES() CheckWayland() + + # The stand-ins for what the older libwayland on some webOS firmware lacks + # (wl_proxy_get_version and the marshal constructors) only exist in + # the dynamic loader, SDL_waylanddyn.c. + if(WEBOS AND HAVE_WAYLAND AND NOT HAVE_WAYLAND_SHARED) + message(FATAL_ERROR + "webOS requires Wayland to be loaded dynamically, " + "but this build links Wayland directly.") + endif() + CheckOpenVR() CheckVivante() CheckVulkan()