From 88e392fd98a1d49d787860f4b504a01f082c6ae6 Mon Sep 17 00:00:00 2001 From: Tobias Markmann Date: Mon, 6 Jul 2015 11:02:33 +0200 Subject: Fix './scons --help' if no Qt installation can be found Test-Information: Tested on Elementary OS 0.2. Change-Id: Ieae4fc2a2c6fdfaaac9895153b09c9504ef71495 diff --git a/BuildTools/SCons/Tools/qt4.py b/BuildTools/SCons/Tools/qt4.py index 1fe2294..6c54b1e 100644 --- a/BuildTools/SCons/Tools/qt4.py +++ b/BuildTools/SCons/Tools/qt4.py @@ -196,11 +196,11 @@ AutomocStatic = _Automoc('StaticObject') def _detect(env): """Not really safe, but fast method to detect the QT library""" - try: return env['QTDIR'] - except KeyError: pass + if 'QTDIR' in env : + return env['QTDIR'] - try: return os.environ['QTDIR'] - except KeyError: pass + if 'QTDIR' in os.environ : + return os.environ['QTDIR'] moc = None if env["qt5"]: diff --git a/Swift/SConscript b/Swift/SConscript index 9f1a213..566019c 100644 --- a/Swift/SConscript +++ b/Swift/SConscript @@ -13,5 +13,5 @@ if env["SCONS_STAGE"] == "build" : if "Swift" in env["PROJECTS"] : print "Warning: Swift requires Qt. Not building the Swift Qt application." env["PROJECTS"].remove("Swift") - elif env["target"] == "native": + elif not GetOption("help") and env["target"] == "native": SConscript("QtUI/SConscript") -- cgit v0.10.2-6-g49f6