avoid unnessary linking of plugin-only libs by libmapnik by changing SConscript execution order (addresses #371, more work needed in #214)
This commit is contained in:
parent
605d80bb15
commit
0e7ca8ed44
1 changed files with 18 additions and 18 deletions
36
SConstruct
36
SConstruct
|
@ -862,6 +862,24 @@ Export('env')
|
||||||
if env['INTERNAL_LIBAGG']:
|
if env['INTERNAL_LIBAGG']:
|
||||||
SConscript('agg/SConscript')
|
SConscript('agg/SConscript')
|
||||||
|
|
||||||
|
# Build the requested and able-to-be-compiled input plug-ins
|
||||||
|
GDAL_BUILT = False
|
||||||
|
OGR_BUILT = False
|
||||||
|
for plugin in env['REQUESTED_PLUGINS']:
|
||||||
|
details = env['PLUGINS'][plugin]
|
||||||
|
if details['lib'] in env['LIBS']:
|
||||||
|
SConscript('plugins/input/%s/SConscript' % plugin)
|
||||||
|
if plugin == 'ogr': OGR_BUILT = True
|
||||||
|
if plugin == 'gdal': GDAL_BUILT = True
|
||||||
|
if plugin == 'ogr' or plugin == 'gdal':
|
||||||
|
if GDAL_BUILT and OGR_BUILT:
|
||||||
|
env['LIBS'].remove(details['lib'])
|
||||||
|
else:
|
||||||
|
env['LIBS'].remove(details['lib'])
|
||||||
|
elif not details['lib']:
|
||||||
|
# build internal shape and raster plugins
|
||||||
|
SConscript('plugins/input/%s/SConscript' % plugin)
|
||||||
|
|
||||||
# Build the core library
|
# Build the core library
|
||||||
SConscript('src/SConscript')
|
SConscript('src/SConscript')
|
||||||
|
|
||||||
|
@ -879,24 +897,6 @@ if 'boost_program_options%s' % env['BOOST_APPEND'] in env['LIBS']:
|
||||||
env['LIBS'].remove('boost_program_options%s' % env['BOOST_APPEND'])
|
env['LIBS'].remove('boost_program_options%s' % env['BOOST_APPEND'])
|
||||||
else :
|
else :
|
||||||
color_print(1,"WARNING: Cannot find boost_program_options. 'shapeindex' won't be available")
|
color_print(1,"WARNING: Cannot find boost_program_options. 'shapeindex' won't be available")
|
||||||
|
|
||||||
GDAL_BUILT = False
|
|
||||||
OGR_BUILT = False
|
|
||||||
# Build the requested and able-to-be-compiled input plug-ins
|
|
||||||
for plugin in env['REQUESTED_PLUGINS']:
|
|
||||||
details = env['PLUGINS'][plugin]
|
|
||||||
if details['lib'] in env['LIBS']:
|
|
||||||
SConscript('plugins/input/%s/SConscript' % plugin)
|
|
||||||
if plugin == 'ogr': OGR_BUILT = True
|
|
||||||
if plugin == 'gdal': GDAL_BUILT = True
|
|
||||||
if plugin == 'ogr' or plugin == 'gdal':
|
|
||||||
if GDAL_BUILT and OGR_BUILT:
|
|
||||||
env['LIBS'].remove(details['lib'])
|
|
||||||
else:
|
|
||||||
env['LIBS'].remove(details['lib'])
|
|
||||||
elif not details['lib']:
|
|
||||||
# build internal shape and raster plugins
|
|
||||||
SConscript('plugins/input/%s/SConscript' % plugin)
|
|
||||||
|
|
||||||
# Build the Python bindings
|
# Build the Python bindings
|
||||||
if 'python' in env['BINDINGS']:
|
if 'python' in env['BINDINGS']:
|
||||||
|
|
Loading…
Reference in a new issue