corrected boost toolkit/append logic
This commit is contained in:
parent
d163c8d59f
commit
67c09a815b
1 changed files with 10 additions and 12 deletions
22
SConstruct
22
SConstruct
|
@ -32,8 +32,7 @@ opts.Add('PREFIX', 'The install path "prefix"', '/usr/local')
|
|||
opts.Add(PathOption('BOOST_INCLUDES', 'Search path for boost include files', '/usr/include'))
|
||||
opts.Add(PathOption('BOOST_LIBS', 'Search path for boost library files', '/usr/' + LIBDIR_SCHEMA))
|
||||
opts.Add('BOOST_TOOLKIT','Specify boost toolkit e.g. gcc41.','',False)
|
||||
|
||||
opts.Add(PathOption('FREETYPE_CONFIG', 'The path to the freetype-config executable.', '/usr/local/bin/freetype-config'))
|
||||
opts.Add(PathOption('FREETYPE_CONFIG', 'The path to the freetype-config executable.', '/usr/bin/freetype-config'))
|
||||
opts.Add(PathOption('FRIBIDI_INCLUDES', 'Search path for fribidi include files', '/usr/include'))
|
||||
opts.Add(PathOption('FRIBIDI_LIBS','Search path for fribidi include files','/usr/' + LIBDIR_SCHEMA))
|
||||
opts.Add(PathOption('PNG_INCLUDES', 'Search path for libpng include files', '/usr/include'))
|
||||
|
@ -108,7 +107,7 @@ if env['BIDI'] : C_LIBSHEADERS.append(['fribidi','fribidi/fribidi.h',True])
|
|||
|
||||
BOOST_LIBSHEADERS = [
|
||||
['thread', 'boost/thread/mutex.hpp', True],
|
||||
['system', 'boost/system/system_error.hpp', True],
|
||||
# ['system', 'boost/system/system_error.hpp', True], # comment this out if building on Darwin + boost_1_35
|
||||
['filesystem', 'boost/filesystem/operations.hpp', True],
|
||||
['regex', 'boost/regex.hpp', True],
|
||||
['program_options', 'boost/program_options.hpp', False]
|
||||
|
@ -119,19 +118,18 @@ for libinfo in C_LIBSHEADERS:
|
|||
print 'Could not find header or shared library for %s, exiting!' % libinfo[0]
|
||||
Exit(1)
|
||||
|
||||
env['BOOST_APPEND'] = ''
|
||||
|
||||
if len(env['BOOST_TOOLKIT']): toolkit = env['BOOST_TOOLKIT']
|
||||
else: toolkit = '' #toolkit = env['CC']
|
||||
|
||||
if len(env['BOOST_TOOLKIT']):
|
||||
env['BOOST_APPEND'] = '-%s-mt' % env['BOOST_TOOLKIT']
|
||||
else:
|
||||
env['BOOST_APPEND']=''
|
||||
|
||||
for count, libinfo in enumerate(BOOST_LIBSHEADERS):
|
||||
if not conf.CheckLibWithHeader('boost_%s%s-mt' % (libinfo[0], env['BOOST_APPEND']), libinfo[1], 'C++'):
|
||||
if not conf.CheckLibWithHeader('boost_%s-%s-mt' % (libinfo[0], toolkit), libinfo[1], 'C++') and libinfo[2] and count == 0:
|
||||
if not conf.CheckLibWithHeader('boost_%s%s' % (libinfo[0], env['BOOST_APPEND']), libinfo[1], 'C++'):
|
||||
if not conf.CheckLibWithHeader('boost_%s%s-mt' % (libinfo[0],env['BOOST_APPEND']), libinfo[1], 'C++') and libinfo[2] and count == 0:
|
||||
print 'Could not find header or shared library for boost %s, exiting!' % libinfo[0]
|
||||
Exit(1)
|
||||
else:
|
||||
env['BOOST_APPEND'] = '-%s-mt' % toolkit
|
||||
|
||||
|
||||
Export('env')
|
||||
|
||||
inputplugins = [ driver.strip() for driver in Split(env['INPUT_PLUGINS'])]
|
||||
|
|
Loading…
Reference in a new issue