diff options
author | Tobias Markmann <tm@ayena.de> | 2015-06-02 10:08:05 (GMT) |
---|---|---|
committer | Tobias Markmann <tm@ayena.de> | 2015-06-02 10:08:05 (GMT) |
commit | dba9757d5805ab308b56c9e623a076426b2dd4c2 (patch) | |
tree | 538dc19776e92e8c04e120d3202e6eb1595beeb6 | |
parent | 44f48755200c7185fcae53e9e944e3a50e8806a5 (diff) | |
download | swift-dba9757d5805ab308b56c9e623a076426b2dd4c2.zip swift-dba9757d5805ab308b56c9e623a076426b2dd4c2.tar.bz2 |
Fix qt4.py Scons module pkg-config support in case Qt is not present
Test-Information:
Tested on Elementary OS 0.2.1 with all Qt components uninstalled.
Previously it would abort configuration and build. Now it simply builds
without Swift and other parts depending on Qt.
Change-Id: I84c91985a0ba1fdab98e97f80621cd41e0a7507b
-rw-r--r-- | BuildTools/SCons/Tools/qt4.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/BuildTools/SCons/Tools/qt4.py b/BuildTools/SCons/Tools/qt4.py index f4b59e3..1c82324 100644 --- a/BuildTools/SCons/Tools/qt4.py +++ b/BuildTools/SCons/Tools/qt4.py @@ -44,6 +44,8 @@ import SCons.Scanner import SCons.Tool import SCons.Util +Import("conf_env") + class ToolQtWarning(SCons.Warnings.Warning): pass @@ -503,13 +505,14 @@ def enable_modules(self, modules, debug=False, crosscompiling=False, version='4' return else: test_env = self.Clone() + test_conf = Configure(test_env) modules_str = " ".join(modules) if not version == '4' : modules_str = modules_str.replace('Qt', 'Qt5') # Check if Qt is registed at pkg-config - ret = test_env.TryAction('pkg-config --exists \'%s\'' % modules_str)[0] - test_env.Result( ret ) + ret = test_conf.TryAction('pkg-config --exists \'%s\'' % modules_str)[0] + test_conf.Result( ret ) if not ret: print("Qt not found.") return |