Skip to content

Commit

Permalink
(conan-io#11432) qt5: add md4c dependency
Browse files Browse the repository at this point in the history
* qt5: add md4c dependency

* don't delete harfbuzz

it seems to be mandatory

* don't remove md4c

bundled header is always used.

* don't unbundle xcb

it's required on xenial

* Update conanfile.py
  • Loading branch information
ericLemanissier authored and AndreyMlashkin committed Jul 29, 2022
1 parent e4145f3 commit f43b69a
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions recipes/qt/5.x.x/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ class QtConan(ConanFile):
"with_dbus": [True, False],
"with_gssapi": [True, False],
"with_atspi": [True, False],
"with_md4c": [True, False],

"gui": [True, False],
"widgets": [True, False],
Expand Down Expand Up @@ -119,6 +120,7 @@ class QtConan(ConanFile):
"with_dbus": False,
"with_gssapi": False,
"with_atspi": False,
"with_md4c": True,

"gui": True,
"widgets": True,
Expand Down Expand Up @@ -235,6 +237,7 @@ def configure(self):
del self.options.with_harfbuzz
del self.options.with_libjpeg
del self.options.with_libpng
del self.options.with_md4c

if not self.options.with_dbus:
del self.options.with_atspi
Expand Down Expand Up @@ -408,6 +411,8 @@ def requirements(self):
self.requires("krb5/1.18.3") # conan-io/conan-center-index#4102
if self.options.get_safe("with_atspi"):
self.requires("at-spi2-core/2.44.0")
if self.options.get_safe("with_md4c", False):
self.requires("md4c/0.4.8")

def source(self):
tools.get(**self.conan_data["sources"][self.version],
Expand Down Expand Up @@ -625,7 +630,8 @@ def build(self):
("with_harfbuzz", "harfbuzz"),
("with_libjpeg", "libjpeg"),
("with_libpng", "libpng"),
("with_sqlite3", "sqlite")]:
("with_sqlite3", "sqlite"),
("with_md4c", "libmd4c")]:
if self.options.get_safe(opt, False):
if self.options.multiconfiguration:
args += ["-qt-" + conf_arg]
Expand Down Expand Up @@ -655,7 +661,8 @@ def build(self):
("openal", "OPENAL"),
("zstd", "ZSTD"),
("libalsa", "ALSA"),
("xkbcommon", "XKBCOMMON")]
("xkbcommon", "XKBCOMMON"),
("md4c", "LIBMD4C")]
for package, var in libmap:
if package in self.deps_cpp_info.deps:
if package == "freetype":
Expand Down Expand Up @@ -1006,6 +1013,8 @@ def _create_plugin(pluginname, libname, plugintype, requires):
gui_reqs.append("libjpeg-turbo::libjpeg-turbo")
if self.options.with_libjpeg == "libjpeg":
gui_reqs.append("libjpeg::libjpeg")
if self.options.with_md4c:
gui_reqs.append("md4c::md4c")
_create_module("Gui", gui_reqs)
build_modules.append(self._cmake_qt5_private_file("Gui"))
self.cpp_info.components["qtGui"].build_modules["cmake_find_package"].append(self._cmake_qt5_private_file("Gui"))
Expand Down

0 comments on commit f43b69a

Please sign in to comment.