scons: only link in libraries that are required by the build

This commit is contained in:
Dane Springmeyer 2013-02-22 15:13:39 -08:00
parent b9e065cc58
commit 3f9e232b9a

View file

@ -56,11 +56,20 @@ regex = 'boost_regex%s' % env['BOOST_APPEND']
system = 'boost_system%s' % env['BOOST_APPEND']
# clear out and re-set libs for this env
lib_env['LIBS'] = ['freetype','ltdl','png','tiff','z','proj',env['ICU_LIB_NAME'],filesystem,system,regex]
lib_env['LIBS'] = ['freetype','ltdl','z',env['ICU_LIB_NAME'],filesystem,system,regex]
if env['PROJ']:
lib_env['LIBS'].append('proj')
if env['PNG']:
lib_env['LIBS'].append('png')
if env['JPEG']:
lib_env['LIBS'].append('jpeg')
if env['TIFF']:
lib_env['LIBS'].append('tiff')
if len(env['EXTRA_FREETYPE_LIBS']):
lib_env['LIBS'].extend(copy(env['EXTRA_FREETYPE_LIBS']))