From 6fe5976994d86a764961a52bdfcb4cb6f4e1923e Mon Sep 17 00:00:00 2001 From: Jordan Williams Date: Tue, 2 Jan 2024 15:30:42 -0600 Subject: [PATCH] qt/5.x.x: Fix opengl/system dependency to not be required when using es2 The opengl/system dependency is very misleading. For Linux, it is a requirement for the legacy gl interface used for X11. This is not necessarily required when using the es2 OpenGL backend and likely Wayland. This PR only requires opengl/system on Linux when with_x11 is enabled. Fixes #22116. --- recipes/qt/5.x.x/conanfile.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/recipes/qt/5.x.x/conanfile.py b/recipes/qt/5.x.x/conanfile.py index a4c631120b356..53baad6547e1a 100644 --- a/recipes/qt/5.x.x/conanfile.py +++ b/recipes/qt/5.x.x/conanfile.py @@ -384,9 +384,13 @@ def requirements(self): self.requires("libalsa/1.2.10") if self.options.get_safe("with_x11"): self.requires("xorg/system") + if self.options.get_safe("opengl", "no") != "no": + self.requires("opengl/system") + if self.settings.os in ["FreeBSD", "Linux"] and not self.options.get_safe("with_x11") and self.options.get_safe("opengl", "no") != "no": + self.requires("egl/system") if self.options.get_safe("with_x11") or self.options.qtwayland: self.requires("xkbcommon/1.5.0") - if self.options.get_safe("opengl", "no") != "no": + if self.options.get_safe("opengl", "no") != "no" and not self.settings.os in ["FreeBSD", "Linux"]: self.requires("opengl/system") if self.options.with_zstd: self.requires("zstd/1.5.5") @@ -1077,7 +1081,9 @@ def _create_plugin(pluginname, libname, plugintype, requires): gui_reqs.append("xkbcommon::xkbcommon") if self.options.get_safe("with_x11", False): gui_reqs.append("xorg::xorg") - if self.options.get_safe("opengl", "no") != "no": + if self.options.get_safe("opengl", "no") != "no": + gui_reqs.append("opengl::opengl") + if self.options.get_safe("opengl", "no") != "no" and self.settings.os not in ["FreeBSD", "Linux"]: gui_reqs.append("opengl::opengl") if self.options.get_safe("with_vulkan", False): gui_reqs.append("vulkan-loader::vulkan-loader")