From dba9757d5805ab308b56c9e623a076426b2dd4c2 Mon Sep 17 00:00:00 2001 From: Tobias Markmann Date: Tue, 2 Jun 2015 12:08:05 +0200 Subject: 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 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 -- cgit v0.10.2-6-g49f6