diff options
Diffstat (limited to 'BuildTools/SCons')
-rw-r--r-- | BuildTools/SCons/Tools/qt4.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/BuildTools/SCons/Tools/qt4.py b/BuildTools/SCons/Tools/qt4.py index 625f807..1fe2294 100644 --- a/BuildTools/SCons/Tools/qt4.py +++ b/BuildTools/SCons/Tools/qt4.py @@ -206,13 +206,13 @@ def _detect(env): if env["qt5"]: moc = env.WhereIs('moc-qt5') or env.WhereIs('moc5') or env.WhereIs('moc') else : moc = env.WhereIs('moc-qt4') or env.WhereIs('moc4') or env.WhereIs('moc') if moc: # Test whether the moc command we found is real, or whether it is just the qtchooser dummy. - p = subprocess.Popen([moc, "-v"], shell=True, stdin=PIPE, stdout=PIPE, stderr=PIPE) + p = subprocess.Popen([moc, "-v"], shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) p.communicate() if p.returncode == 0: import sys if sys.platform == "darwin" : return "" QTDIR = os.path.dirname(os.path.dirname(moc)) @@ -513,17 +513,19 @@ def enable_modules(self, modules, debug=False, crosscompiling=False, version='4' if not version == '4' : modules_str = modules_str.replace('Qt', 'Qt5') # Check if Qt is registered at pkg-config ret = test_conf.TryAction('pkg-config --exists \'%s\'' % modules_str)[0] if ret != 1: + test_conf.Finish() raise Exception("Qt has not been found using pkg-config.") return test_conf.env.ParseConfig("pkg-config --cflags --libs " + modules_str) self.AppendUnique(LIBS=test_conf.env["LIBS"], LIBPATH=test_conf.env["LIBPATH"], CPPPATH=test_conf.env["CPPPATH"]) self["QT4_MOCCPPPATH"] = self["CPPPATH"] + test_conf.Finish() return if sys.platform == "win32" or crosscompiling : if crosscompiling: transformedQtdir = transformToWinePath(self['QTDIR']) self['QT4_MOC'] = "QTDIR=%s %s"%( transformedQtdir, self['QT4_MOC']) |