Skip to content
This repository has been archived by the owner on Dec 4, 2024. It is now read-only.

Commit

Permalink
Merge pull request #62 from ericLemanissier/qt6
Browse files Browse the repository at this point in the history
Qt6
  • Loading branch information
ericLemanissier authored Feb 21, 2024
2 parents 7c7cb1c + d030b9c commit 958386b
Showing 1 changed file with 25 additions and 2 deletions.
27 changes: 25 additions & 2 deletions recipes/qt/6.x.x/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ class QtConan(ConanFile):
"with_gssapi": [True, False],
"with_md4c": [True, False],
"with_x11": [True, False],
"with_egl": [True, False],

"gui": [True, False],
"widgets": [True, False],
Expand Down Expand Up @@ -107,6 +108,7 @@ class QtConan(ConanFile):
"with_gssapi": False,
"with_md4c": True,
"with_x11": True,
"with_egl": False,

"gui": True,
"widgets": True,
Expand Down Expand Up @@ -165,6 +167,7 @@ def config_options(self):
self.options.with_glib = False
del self.options.with_libalsa
del self.options.with_x11
del self.options.with_egl

if self.settings.os == "Windows":
self.options.opengl = "dynamic"
Expand Down Expand Up @@ -198,6 +201,7 @@ def configure(self):
del self.options.with_libpng
del self.options.with_md4c
self.options.rm_safe("with_x11")
self.options.rm_safe("with_egl")

if not self.options.get_safe("qtmultimedia"):
self.options.rm_safe("with_libalsa")
Expand Down Expand Up @@ -354,6 +358,8 @@ def requirements(self):
self.requires("xkbcommon/1.5.0")
if self.options.get_safe("with_x11", False):
self.requires("xorg/system")
if self.options.get_safe("with_egl"):
self.requires("egl/system")
if self.settings.os != "Windows" and self.options.get_safe("opengl", "no") != "no":
self.requires("opengl/system")
if self.options.with_zstd:
Expand All @@ -370,6 +376,7 @@ def requirements(self):
self.requires("nss/3.93")
self.requires("libdrm/2.4.119")
if self.options.get_safe("with_gstreamer", False):
self.requires("gstreamer/1.19.2")
self.requires("gst-plugins-base/1.19.2")
if self.options.get_safe("with_pulseaudio", False):
self.requires("pulseaudio/14.2")
Expand Down Expand Up @@ -415,6 +422,16 @@ def generate(self):
tc.set_property("wayland::wayland-server", "cmake_target_name", "Wayland::Server")
tc.set_property("wayland::wayland-cursor", "cmake_target_name", "Wayland::Cursor")
tc.set_property("wayland::wayland-egl", "cmake_target_name", "Wayland::Egl")

# override https://github.com/qt/qtbase/blob/dev/cmake/3rdparty/extra-cmake-modules/find-modules/FindEGL.cmake
tc.set_property("egl", "cmake_file_name", "EGL")
tc.set_property("egl", "cmake_find_mode", "module")
tc.set_property("egl::egl", "cmake_target_name", "EGL::EGL")

# don't override https://github.com/qt/qtmultimedia/blob/dev/cmake/FindGStreamer.cmake
tc.set_property("gstreamer", "cmake_file_name", "gstreamer_conan")
tc.set_property("gstreamer", "cmake_find_mode", "module")

tc.generate()

for f in glob.glob("*.cmake"):
Expand Down Expand Up @@ -510,7 +527,9 @@ def generate(self):
("with_zstd", "zstd"),
("with_vulkan", "vulkan"),
("with_brotli", "brotli"),
("with_gssapi", "gssapi")]:
("with_gssapi", "gssapi"),
("with_egl", "egl"),
("with_gstreamer", "gstreamer")]:
tc.variables[f"FEATURE_{conf_arg}"] = ("ON" if self.options.get_safe(opt, False) else "OFF")


Expand Down Expand Up @@ -1021,6 +1040,8 @@ 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("with_egl"):
gui_reqs.append("egl::egl")
if self.settings.os != "Windows" and self.options.get_safe("opengl", "no") != "no":
gui_reqs.append("opengl::opengl")
if self.options.get_safe("with_vulkan", False):
Expand Down Expand Up @@ -1235,7 +1256,9 @@ def _create_plugin(pluginname, libname, plugintype, requires):
if self.options.qtdeclarative and qt_quick_enabled:
_create_module("MultimediaQuick", ["Multimedia", "Quick"])
if self.options.with_gstreamer:
_create_plugin("QGstreamerMediaPlugin", "gstreamermediaplugin", "multimedia", ["gst-plugins-base::gst-plugins-base"])
_create_plugin("QGstreamerMediaPlugin", "gstreamermediaplugin", "multimedia", [
"gstreamer::gstreamer",
"gst-plugins-base::gst-plugins-base"])

if self.options.get_safe("qtpositioning"):
_create_module("Positioning", [])
Expand Down

0 comments on commit 958386b

Please sign in to comment.