diff options
author | Aaron Small <a.small@unb.ca> | 2017-03-21 23:38:24 -0400 |
---|---|---|
committer | Aaron Small <a.small@unb.ca> | 2017-04-09 03:31:39 -0400 |
commit | 76c8491d770d558d4140789e01a9cb74701600ff (patch) | |
tree | bc55211a73dfc410bd811db6762373ebb32294d6 /mesonbuild/modules/qt4.py | |
parent | b89af8b6dd0efc97867be96e91630d8a1c4d3316 (diff) | |
download | meson-76c8491d770d558d4140789e01a9cb74701600ff.zip meson-76c8491d770d558d4140789e01a9cb74701600ff.tar.gz meson-76c8491d770d558d4140789e01a9cb74701600ff.tar.bz2 |
Add an option to dependencies called 'method'. This can be used to
configure a detection method, for those types of dependencies that have
more than one means of detection.
The default detection methods are unchanged if 'method' is not
specified, and all dependencies support the method 'auto', which is the
same as not specifying a method.
The dependencies which do support multiple detection methods
additionally support other values, depending on the dependency.
Diffstat (limited to 'mesonbuild/modules/qt4.py')
-rw-r--r-- | mesonbuild/modules/qt4.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/mesonbuild/modules/qt4.py b/mesonbuild/modules/qt4.py index 7146739..0386291 100644 --- a/mesonbuild/modules/qt4.py +++ b/mesonbuild/modules/qt4.py @@ -24,14 +24,14 @@ from . import ModuleReturnValue class Qt4Module(ExtensionModule): tools_detected = False - def _detect_tools(self, env): + def _detect_tools(self, env, method): if self.tools_detected: return mlog.log('Detecting Qt4 tools') # FIXME: We currently require Qt4 to exist while importing the module. # We should make it gracefully degrade and not create any targets if # the import is marked as 'optional' (not implemented yet) - kwargs = {'required': 'true', 'modules': 'Core', 'silent': 'true'} + kwargs = {'required': 'true', 'modules': 'Core', 'silent': 'true', 'method': method} qt4 = Qt4Dependency(env, kwargs) # Get all tools and then make sure that they are the right version self.moc, self.uic, self.rcc = qt4.compilers_detect() @@ -113,7 +113,8 @@ class Qt4Module(ExtensionModule): if not isinstance(sources, list): sources = [sources] sources += args[1:] - self._detect_tools(state.environment) + method = kwargs.get('method', 'auto') + self._detect_tools(state.environment, method) err_msg = "{0} sources specified and couldn't find {1}, " \ "please check your qt4 installation" if len(moc_headers) + len(moc_sources) > 0 and not self.moc.found(): |