From a6608814d027b0e6edc6f939c1d73f7c7f9e4771 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Tue, 15 Nov 2011 12:07:46 -0800 Subject: [PATCH] scons: get linking correct to sqlite dependecies if linking is static --- plugins/input/sqlite/build.py | 8 ++++++-- utils/pgsql2sqlite/build.py | 6 +++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/plugins/input/sqlite/build.py b/plugins/input/sqlite/build.py index 7753d16c5..2fb8554af 100644 --- a/plugins/input/sqlite/build.py +++ b/plugins/input/sqlite/build.py @@ -40,8 +40,12 @@ libraries.append('mapnik2') libraries.append(env['ICU_LIB_NAME']) libraries.append('boost_system%s' % env['BOOST_APPEND']) libraries.append('boost_filesystem%s' % env['BOOST_APPEND']) - -input_plugin = plugin_env.SharedLibrary('../sqlite', source=sqlite_src, SHLIBPREFIX='', SHLIBSUFFIX='.input', LIBS=libraries, LINKFLAGS=env['CUSTOM_LDFLAGS']) + +linkflags = env['CUSTOM_LDFLAGS'] +if env['SQLITE_LINKFLAGS']: + linkflags.append(env['SQLITE_LINKFLAGS']) + +input_plugin = plugin_env.SharedLibrary('../sqlite', source=sqlite_src, SHLIBPREFIX='', SHLIBSUFFIX='.input', LIBS=libraries, LINKFLAGS=linkflags) # if the plugin links to libmapnik2 ensure it is built first Depends(input_plugin, env.subst('../../../src/%s' % env['MAPNIK_LIB_NAME'])) diff --git a/utils/pgsql2sqlite/build.py b/utils/pgsql2sqlite/build.py index 8ea1a8b59..ec301237d 100644 --- a/utils/pgsql2sqlite/build.py +++ b/utils/pgsql2sqlite/build.py @@ -42,7 +42,11 @@ libraries = [] boost_program_options = 'boost_program_options%s' % env['BOOST_APPEND'] libraries.extend([boost_program_options,'sqlite3','pq','mapnik2']) -pgsql2sqlite = program_env.Program('pgsql2sqlite', source, CPPPATH=headers, LIBS=libraries, LINKFLAGS=env['CUSTOM_LDFLAGS']) +linkflags = env['CUSTOM_LDFLAGS'] +if env['SQLITE_LINKFLAGS']: + linkflags.append(env['SQLITE_LINKFLAGS']) + +pgsql2sqlite = program_env.Program('pgsql2sqlite', source, CPPPATH=headers, LIBS=libraries, LINKFLAGS=linkflags) Depends(pgsql2sqlite, env.subst('../../src/%s' % env['MAPNIK_LIB_NAME'])) if 'uninstall' not in COMMAND_LINE_TARGETS: