scons: when linking statically include other required libpq deps

This commit is contained in:
Dane Springmeyer 2011-12-19 10:51:38 -08:00
parent b62cebf9b5
commit b51c06f5ad

View file

@ -33,15 +33,23 @@ postgis_src = Split(
"""
)
libraries = ['pq']
# clear out and rebuild libs
plugin_env['LIBS'] = ['pq']
# Link Library to Dependencies
libraries.append('mapnik')
libraries.append(env['ICU_LIB_NAME'])
plugin_env['LIBS'].append('mapnik')
plugin_env['LIBS'].append(env['ICU_LIB_NAME'])
if env['THREADING'] == 'multi':
libraries.append('boost_thread%s' % env['BOOST_APPEND'])
plugin_env['LIBS'].append('boost_thread%s' % env['BOOST_APPEND'])
input_plugin = plugin_env.SharedLibrary('../postgis', source=postgis_src, SHLIBPREFIX='', SHLIBSUFFIX='.input', LIBS=libraries, LINKFLAGS=env['CUSTOM_LDFLAGS'])
if env['RUNTIME_LINK'] == 'static':
#cmd = 'pg_config --libs'
#plugin_env.ParseConfig(cmd)
# pg_config does not seem to report correct deps of libpq
# so resort to hardcoding for now
plugin_env['LIBS'].extend(['ldap','pam','ssl','crypto','krb5'])
input_plugin = plugin_env.SharedLibrary('../postgis', source=postgis_src, SHLIBPREFIX='', SHLIBSUFFIX='.input', LINKFLAGS=env['CUSTOM_LDFLAGS'])
# if the plugin links to libmapnik ensure it is built first
Depends(input_plugin, env.subst('../../../src/%s' % env['MAPNIK_LIB_NAME']))