better linking for postgis.input using pkg-config
This commit is contained in:
parent
2c8cf76808
commit
ce1ff9902e
1 changed files with 11 additions and 13 deletions
|
@ -34,24 +34,22 @@ plugin_sources = Split(
|
|||
""" % locals()
|
||||
)
|
||||
|
||||
# Link Library to Dependencies
|
||||
cxxflags = []
|
||||
plugin_env['LIBS'] = []
|
||||
libraries = ['pq']
|
||||
|
||||
if env['RUNTIME_LINK'] == 'static':
|
||||
# pkg-config is more reliable than pg_config across platforms
|
||||
cmd = 'pkg-config libpq --libs --static'
|
||||
plugin_env.ParseConfig(cmd)
|
||||
else:
|
||||
plugin_env.Append(LIBS='pq')
|
||||
|
||||
# Link Library to Dependencies
|
||||
libraries = copy(plugin_env['LIBS'])
|
||||
|
||||
if env['THREADING'] == 'multi':
|
||||
libraries.append('boost_thread%s' % env['BOOST_APPEND'])
|
||||
|
||||
if env['RUNTIME_LINK'] == 'static':
|
||||
# pg_config does not seem to report correct deps of libpq
|
||||
# on os x so resort to hardcoding for now
|
||||
if env['PLATFORM'] == 'Darwin':
|
||||
libraries.extend(['ldap', 'pam', 'ssl', 'crypto', 'krb5'])
|
||||
else:
|
||||
# TODO - parse back into libraries variable
|
||||
plugin_env.ParseConfig('pg_config --libs')
|
||||
if plugin_env['LIBS']:
|
||||
libraries.extend(copy(plugin_env['LIBS']))
|
||||
|
||||
if env['PLUGIN_LINKING'] == 'shared':
|
||||
libraries.insert(0,'mapnik')
|
||||
libraries.append(env['ICU_LIB_NAME'])
|
||||
|
|
Loading…
Add table
Reference in a new issue