mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 05:25:26 +00:00
Scons: load qt4 module with debug=False when the debug library is not available; modify boost/check warning message
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16323 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
e5b8f69561
commit
cd43719f96
@ -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_'
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user