]> git.lyx.org Git - features.git/blobdiff - development/scons/SConstruct
Scons: check the validity of QTDIR, and the existence of uic and moc
[features.git] / development / scons / SConstruct
index d843a15c8902d49ed9e1990154df7a3980b611c6..836a5ea8152bca56cf82944868aa049a27251802 100644 (file)
@@ -542,8 +542,11 @@ if env.has_key('qt_dir') and env['qt_dir']:
     env.AppendUnique(LIBPATH = [os.path.join(env['qt_dir'], 'lib')])
     # set environment so that moc etc can be found even if its path is not set properly
     env.PrependENVPath('PATH', os.path.join(env['qt_dir'], 'bin'))
-else:
+elif os.path.isdir(os.environ.get('QTDIR', '/usr/lib/qt-3.3')):
     env['QTDIR'] = os.environ.get('QTDIR', '/usr/lib/qt-3.3')
+else:
+    # QTDIR is not always used so no warning is issued.
+    env['QTDIR'] = 'QTDIR_is_not_defined'
 
 if env.has_key('qt_lib_path') and env['qt_lib_path']:
     qt_lib_path = env.subst('$qt_lib_path')
@@ -781,6 +784,13 @@ if not fast_start:
 else:
     env['MSGFMT'] = env_cache['MSGFMT']
 
+# check uic and moc commands for qt frontends
+if not fast_start:
+    if frontend[:2] == 'qt' and (conf.CheckCommand('uic') == None \
+        or conf.CheckCommand('moc') == None):
+        print 'uic or moc command is not found for frontend', frontend
+        Exit(1)
+
 #
 # Customized builders
 #