Skip to content

Commit

Permalink
set default options
Browse files Browse the repository at this point in the history
  • Loading branch information
ericLemanissier committed Mar 19, 2024
1 parent bcb1f2b commit f3a1120
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 20 deletions.
21 changes: 11 additions & 10 deletions recipes/qt/5.x.x/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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")
Expand Down
21 changes: 11 additions & 10 deletions recipes/qt/6.x.x/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand All @@ -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 \
Expand Down

0 comments on commit f3a1120

Please sign in to comment.