fix static linking of gdal/ogr plugins on linux - refs mapnik/mapnik-packaging#123

This commit is contained in:
Dane Springmeyer 2014-02-27 14:02:24 -08:00
parent b1cfe548b0
commit 6f14228e30
2 changed files with 4 additions and 4 deletions

View file

@ -35,17 +35,17 @@ plugin_sources = Split(
)
plugin_env['LIBS'] = []
plugin_env.Append(LIBS=env['PLUGINS']['gdal']['lib'])
if env['RUNTIME_LINK'] == 'static':
cmd = 'gdal-config --dep-libs'
plugin_env.ParseConfig(cmd)
# Link Library to Dependencies
plugin_env.Append(LIBS=env['PLUGINS']['gdal']['lib'])
libraries = copy(plugin_env['LIBS'])
if env['PLUGIN_LINKING'] == 'shared':
libraries.append('mapnik')
libraries.insert(0,'mapnik')
libraries.append(env['ICU_LIB_NAME'])
libraries.append('boost_system%s' % env['BOOST_APPEND'])

View file

@ -39,13 +39,13 @@ plugin_sources = Split(
cxxflags = []
plugin_env['LIBS'] = []
plugin_env.Append(LIBS=env['PLUGINS']['ogr']['lib'])
if env['RUNTIME_LINK'] == 'static':
cmd = 'gdal-config --dep-libs'
plugin_env.ParseConfig(cmd)
# Link Library to Dependencies
plugin_env.Append(LIBS=env['PLUGINS']['ogr']['lib'])
libraries = copy(plugin_env['LIBS'])
if env.get('BOOST_LIB_VERSION_FROM_HEADER'):
@ -58,7 +58,7 @@ if env.get('BOOST_LIB_VERSION_FROM_HEADER'):
plugin_env.Append(CXXFLAGS=cxxflags)
if env['PLUGIN_LINKING'] == 'shared':
libraries.append('mapnik')
libraries.insert(0,'mapnik')
libraries.append(env['ICU_LIB_NAME'])
libraries.append('boost_system%s' % env['BOOST_APPEND'])