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

qt5: add md4c dependency #11432

Merged
merged 5 commits into from
Jul 6, 2022
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 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 All @@ -424,6 +429,9 @@ def source(self):
"-ldbus-1d",
"-ldbus-1"
)

for f in ['double-conversion', 'freetype', 'harfbuzz-ng', 'libjpeg', 'libpng', 'pcre2', 'sqlite', 'zlib']:
tools.rmdir(os.path.join(self.source_folder, "qt5", "qtbase", "src", "3rdparty", f))

def _make_program(self):
if self._is_msvc:
Expand Down Expand Up @@ -625,7 +633,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 +664,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 +1016,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