Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qt/5.x.x: Fix opengl/system dependency to not be required when using es2 #22132

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
13 changes: 10 additions & 3 deletions recipes/qt/5.x.x/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,9 +397,13 @@
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") or self.options.qtwebengine):
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 self.settings.os not in ["FreeBSD", "Linux"]:
self.requires("opengl/system")
if self.options.with_zstd:
self.requires("zstd/1.5.5")
Expand All @@ -411,7 +415,6 @@
self.requires("libxshmfence/1.3")
self.requires("nss/3.93")
self.requires("libdrm/2.4.119")
self.requires("egl/system")
if self.options.get_safe("with_gstreamer", False):
self.requires("gst-plugins-base/1.19.2")
if self.options.get_safe("with_pulseaudio", False):
Expand Down Expand Up @@ -946,7 +949,7 @@
filecontents += 'set(CMAKE_AUTOMOC_MACRO_NAMES "Q_OBJECT" "Q_GADGET" "Q_GADGET_EXPORT" "Q_NAMESPACE" "Q_NAMESPACE_EXPORT")\n'
save(self, os.path.join(self.package_folder, self._cmake_core_extras_file), filecontents)

def _create_private_module(module, dependencies=[]):

Check warning on line 952 in recipes/qt/5.x.x/conanfile.py

View workflow job for this annotation

GitHub Actions / Lint changed conanfile.py (v2 migration)

Dangerous default value [] as argument
if "Core" not in dependencies:
dependencies.append("Core")
dependencies_string = ';'.join(f'Qt5::{dependency}' for dependency in dependencies)
Expand Down Expand Up @@ -1015,7 +1018,7 @@
reqs.append(corrected_req)
return reqs

def _create_module(module, requires=[], has_include_dir=True):

Check warning on line 1021 in recipes/qt/5.x.x/conanfile.py

View workflow job for this annotation

GitHub Actions / Lint changed conanfile.py (v2 migration)

Dangerous default value [] as argument
componentname = f"qt{module}"
assert componentname not in self.cpp_info.components, f"Module {module} already present in self.cpp_info.components"
self.cpp_info.components[componentname].set_property("cmake_target_name", f"Qt5::{module}")
Expand Down Expand Up @@ -1101,7 +1104,11 @@
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")
elif self.options.get_safe("opengl", "no") != "no":
gui_reqs.append("egl::egl")
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
Loading