]> git.lyx.org Git - features.git/commitdiff
Scons: load qt4 module with debug=False when the debug library is not available;...
authorBo Peng <bpeng@lyx.org>
Mon, 18 Dec 2006 15:30:50 +0000 (15:30 +0000)
committerBo Peng <bpeng@lyx.org>
Mon, 18 Dec 2006 15:30:50 +0000 (15:30 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16323 a592a061-630c-0410-9148-cb99ea01b6c8

development/scons/SConstruct
development/scons/scons_utils.py

index cd8d509ed9dabae6911e8200b0cc0c137cccb561..10293e0434901afd769579e0105e3495a06cb1c1 100644 (file)
@@ -697,13 +697,17 @@ if frontend == 'qt4':
         if mode == 'debug' and use_vc and \
             conf.CheckLibWithHeader('QtCored4', 'QtGui/QApplication', 'c++', 'QApplication qapp();'):
             qt_lib_suffix = 'd4'
+            use_qt_debug_libs = True
         else:
             qt_lib_suffix = '4'
+            use_qt_debug_libs = False
     else:
         if mode == 'debug' and conf.CheckLibWithHeader('QtCore_debug', 'QtGui/QApplication', 'c++', 'QApplication qapp();'):
             qt_lib_suffix = '_debug'
+            use_qt_debug_libs = True
         else:
             qt_lib_suffix = ''
+            use_qt_debug_libs = False
     frontend_libs = [x + qt_lib_suffix for x in qt_libs]
     qtcore_lib = ['QtCore' + qt_lib_suffix]
     
@@ -1699,7 +1703,7 @@ if build_qt4:
     # process .C file!!! (add to cxx_suffixes )
     #
     qt4env.Tool('qt4', [scons_dir])
-    qt4env.EnableQt4Modules(qt_libs, debug = (mode == 'debug'))
+    qt4env.EnableQt4Modules(qt_libs, debug = (mode == 'debug' and use_qt_debug_libs))
     qt4env['QT4_AUTOSCAN'] = 0
     qt4env['QT4_UICDECLFLAGS'] = '-tr lyx::qt_'
 
index 1e9cde59fb19c9cc81f25d98325b1f4f6aceea0d..168e4baf4fa72185d3825f7cf35ecda44e3d96ce 100644 (file)
@@ -196,8 +196,11 @@ def checkBoostLibraries(conf, libs, lib_paths, inc_paths, versions, isDebug):
                     for ver in versions:
                         lib_files += filter(lambda x: re.search('libboost_%s-\w+-mt-([^dgy]+-)*%s.a' % (lib, ver), x), files)
                 if len(lib_files) == 0:
-                    print 'Warning: Can not find an appropriate boost library in %s.' % path
-                    print 'Allowed versions are ', ', '.join(versions)
+                    if isDebug:
+                        print 'Failed to find the debug version of boost', ' or '.join(versions)
+                    else:
+                        print 'Failed to find the release version of boost', ' or '.join(versions)
+                    # use alternative libraries
                     for ver in versions:
                         lib_files += filter(lambda x: re.search('libboost_%s-[\w-]+%s.a' % (lib, ver), x), files)
                     if len(lib_files) > 0:
@@ -205,6 +208,8 @@ def checkBoostLibraries(conf, libs, lib_paths, inc_paths, versions, isDebug):
                 if len(lib_files) > 0:
                     # get xxx-gcc-1_33_1 from /usr/local/lib/libboost_xxx-gcc-1_33_1.a
                     lib_names.append(lib_files[0].split(os.sep)[-1][3:-2])
+                else:
+                    break
         if len(lib_names) == len(libs):
             found_lib = True
             lib_path = path