diff --git a/recipes/qt/5.x.x/conanfile.py b/recipes/qt/5.x.x/conanfile.py index ebf06bdcf6582..4e8d7f62b2a7d 100644 --- a/recipes/qt/5.x.x/conanfile.py +++ b/recipes/qt/5.x.x/conanfile.py @@ -124,6 +124,7 @@ class QtConan(ConanFile): "multiconfiguration": False, "essential_modules": not os.getenv('CONAN_CENTER_BUILD_SERVICE') } + default_options.update({f"{status}_modules": False for status in _module_statuses if status != "essential"}) no_copy_source = True short_paths = True @@ -226,16 +227,6 @@ def configure(self): if not self.options.with_dbus: del self.options.with_atspi - if not self.options.qtmultimedia: - self.options.rm_safe("with_libalsa") - del self.options.with_openal - del self.options.with_gstreamer - del self.options.with_pulseaudio - - if self.settings.os in ("FreeBSD", "Linux"): - if self.options.qtwebengine: - self.options.with_fontconfig = True - if self.options.multiconfiguration: del self.settings.build_type @@ -281,6 +272,16 @@ def _enablemodule(mod): if module in self.options and not self.options.get_safe(module): setattr(self.options, module, False) + if not self.options.qtmultimedia: + self.options.rm_safe("with_libalsa") + del self.options.with_openal + del self.options.with_gstreamer + del self.options.with_pulseaudio + + if self.settings.os in ("FreeBSD", "Linux"): + if self.options.qtwebengine: + self.options.with_fontconfig = True + def validate(self): if self.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, "11") diff --git a/recipes/qt/6.x.x/conanfile.py b/recipes/qt/6.x.x/conanfile.py index f9ffd91085660..394598a10ecc0 100644 --- a/recipes/qt/6.x.x/conanfile.py +++ b/recipes/qt/6.x.x/conanfile.py @@ -123,6 +123,7 @@ class QtConan(ConanFile): "disabled_features": "", "essential_modules": not os.getenv('CONAN_CENTER_BUILD_SERVICE') } + default_options.update({f"{status}_modules": False for status in _module_statuses if status != "essential"}) short_paths = True @@ -207,16 +208,6 @@ def configure(self): 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") - del self.options.with_openal - del self.options.with_gstreamer - del self.options.with_pulseaudio - - if self.settings.os in ("FreeBSD", "Linux"): - if self.options.get_safe("qtwebengine"): - self.options.with_fontconfig = True - if self.options.multiconfiguration: del self.settings.build_type @@ -243,6 +234,16 @@ def _enablemodule(mod): if getattr(self.options, module).value is None: setattr(self.options, module, False) + if not self.options.get_safe("qtmultimedia"): + self.options.rm_safe("with_libalsa") + del self.options.with_openal + del self.options.with_gstreamer + del self.options.with_pulseaudio + + if self.settings.os in ("FreeBSD", "Linux"): + if self.options.get_safe("qtwebengine"): + self.options.with_fontconfig = True + def validate(self): if os.getenv('CONAN_CENTER_BUILD_SERVICE') is not None: if self.info.settings.compiler == "gcc" and Version(self.info.settings.compiler.version) >= "11" or \