Skip to content

Commit

Permalink
qt/5.x.x: Fix opengl/system dependency to not be required when using es2
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jwillikers committed Jan 2, 2024
1 parent 3fe2ac9 commit 6fe5976
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions recipes/qt/5.x.x/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit 6fe5976

Please sign in to comment.