fix static linking of the osm plugin against libcurl

This commit is contained in:
Dane Springmeyer 2014-04-08 23:15:30 -04:00
parent 7351879e6f
commit f1dd07fd64

View file

@ -21,6 +21,7 @@
Import ('plugin_base')
Import ('env')
from copy import copy
PLUGIN_NAME = 'osm'
@ -37,9 +38,18 @@ plugin_sources = Split(
""" % locals()
)
plugin_env['LIBS'] = []
if env['RUNTIME_LINK'] == 'static':
# pkg-config is more reliable than pg_config across platforms
cmd = 'pkg-config libcurl --libs --static'
plugin_env.ParseConfig(cmd)
else:
plugin_env.Append(LIBS='curl')
plugin_env.Append(LIBS='xml2')
# Link Library to Dependencies
libraries = [ 'xml2' ]
libraries.append('curl')
libraries = copy(plugin_env['LIBS'])
libraries.append(env['ICU_LIB_NAME'])
libraries.append('boost_system%s' % env['BOOST_APPEND'])