aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/modules
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2018-10-24 14:17:44 -0700
committerDylan Baker <dylan@pnwbakers.com>2018-11-14 15:57:37 -0800
commitaa04147a4a2a37aee197ebc0ed179c6fb582b3e9 (patch)
treebc3de0779833f443cbbdb759a3dbad8c21ffd003 /mesonbuild/modules
parent71a5f990d09f04d8eb8d636abf7e2b446fdf826a (diff)
downloadmeson-aa04147a4a2a37aee197ebc0ed179c6fb582b3e9.zip
meson-aa04147a4a2a37aee197ebc0ed179c6fb582b3e9.tar.gz
meson-aa04147a4a2a37aee197ebc0ed179c6fb582b3e9.tar.bz2
dependencies/ui: Allow qt compilers and qmake to be specified in native file
Diffstat (limited to 'mesonbuild/modules')
-rw-r--r--mesonbuild/modules/qt.py9
-rw-r--r--mesonbuild/modules/qt4.py7
-rw-r--r--mesonbuild/modules/qt5.py7
3 files changed, 11 insertions, 12 deletions
diff --git a/mesonbuild/modules/qt.py b/mesonbuild/modules/qt.py
index 7a2c338..367b15b 100644
--- a/mesonbuild/modules/qt.py
+++ b/mesonbuild/modules/qt.py
@@ -18,7 +18,7 @@ from .. import build
from ..mesonlib import MesonException, Popen_safe, extract_as_list, File
from ..dependencies import Dependency, Qt4Dependency, Qt5Dependency
import xml.etree.ElementTree as ET
-from . import ModuleReturnValue, get_include_args
+from . import ModuleReturnValue, get_include_args, ExtensionModule
from ..interpreterbase import permittedKwargs, FeatureNewKwargs
_QT_DEPS_LUT = {
@@ -27,10 +27,11 @@ _QT_DEPS_LUT = {
}
-class QtBaseModule:
+class QtBaseModule(ExtensionModule):
tools_detected = False
- def __init__(self, qt_version=5):
+ def __init__(self, interpreter, qt_version=5):
+ ExtensionModule.__init__(self, interpreter)
self.qt_version = qt_version
def _detect_tools(self, env, method):
@@ -43,7 +44,7 @@ class QtBaseModule:
kwargs = {'required': 'true', 'modules': 'Core', 'silent': 'true', 'method': method}
qt = _QT_DEPS_LUT[self.qt_version](env, kwargs)
# Get all tools and then make sure that they are the right version
- self.moc, self.uic, self.rcc, self.lrelease = qt.compilers_detect()
+ self.moc, self.uic, self.rcc, self.lrelease = qt.compilers_detect(self.interpreter)
# Moc, uic and rcc write their version strings to stderr.
# Moc and rcc return a non-zero result when doing so.
# What kind of an idiot thought that was a good idea?
diff --git a/mesonbuild/modules/qt4.py b/mesonbuild/modules/qt4.py
index 29992d5..112e3e4 100644
--- a/mesonbuild/modules/qt4.py
+++ b/mesonbuild/modules/qt4.py
@@ -14,14 +14,13 @@
from .. import mlog
from .qt import QtBaseModule
-from . import ExtensionModule
-class Qt4Module(ExtensionModule, QtBaseModule):
+class Qt4Module(QtBaseModule):
def __init__(self, interpreter):
- QtBaseModule.__init__(self, qt_version=4)
- ExtensionModule.__init__(self, interpreter)
+ QtBaseModule.__init__(self, interpreter, qt_version=4)
+
def initialize(*args, **kwargs):
mlog.warning('rcc dependencies will not work properly until this upstream issue is fixed:',
diff --git a/mesonbuild/modules/qt5.py b/mesonbuild/modules/qt5.py
index 19623ac..96a7964 100644
--- a/mesonbuild/modules/qt5.py
+++ b/mesonbuild/modules/qt5.py
@@ -14,14 +14,13 @@
from .. import mlog
from .qt import QtBaseModule
-from . import ExtensionModule
-class Qt5Module(ExtensionModule, QtBaseModule):
+class Qt5Module(QtBaseModule):
def __init__(self, interpreter):
- QtBaseModule.__init__(self, qt_version=5)
- ExtensionModule.__init__(self, interpreter)
+ QtBaseModule.__init__(self, interpreter, qt_version=5)
+
def initialize(*args, **kwargs):
mlog.warning('rcc dependencies will not work reliably until this upstream issue is fixed:',