scons: when linking statically include other required libpq deps
This commit is contained in:
parent
b62cebf9b5
commit
b51c06f5ad
1 changed files with 13 additions and 5 deletions
|
@ -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']))
|
||||
|
|
Loading…
Reference in a new issue