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 21555b51c2
commit 0fbcc12678
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,19 +39,19 @@ 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'])
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'])