gdal-config - use both --libs and --dep-libs when RUNTIME_LINK
+ `ogr.input` needs `pkg-config libpq --libs --static`
This commit is contained in:
parent
83f833f1ce
commit
c2c6d2ed60
2 changed files with 9 additions and 2 deletions
|
@ -38,9 +38,10 @@ plugin_env['LIBS'] = []
|
||||||
plugin_env.Append(LIBS=env['PLUGINS']['gdal']['lib'])
|
plugin_env.Append(LIBS=env['PLUGINS']['gdal']['lib'])
|
||||||
|
|
||||||
if env['RUNTIME_LINK'] == 'static':
|
if env['RUNTIME_LINK'] == 'static':
|
||||||
cmd = '%s --dep-libs' % plugin_env['GDAL_CONFIG']
|
cmd = '%s --libs --dep-libs' % plugin_env['GDAL_CONFIG']
|
||||||
plugin_env.ParseConfig(cmd)
|
plugin_env.ParseConfig(cmd)
|
||||||
|
|
||||||
|
|
||||||
# Link Library to Dependencies
|
# Link Library to Dependencies
|
||||||
libraries = copy(plugin_env['LIBS'])
|
libraries = copy(plugin_env['LIBS'])
|
||||||
|
|
||||||
|
|
|
@ -43,8 +43,14 @@ plugin_env['LIBS'] = []
|
||||||
plugin_env.Append(LIBS=env['PLUGINS']['ogr']['lib'])
|
plugin_env.Append(LIBS=env['PLUGINS']['ogr']['lib'])
|
||||||
|
|
||||||
if env['RUNTIME_LINK'] == 'static':
|
if env['RUNTIME_LINK'] == 'static':
|
||||||
cmd = '%s --dep-libs' % plugin_env['GDAL_CONFIG']
|
cmd = '%s --libs --dep-libs' % plugin_env['GDAL_CONFIG']
|
||||||
plugin_env.ParseConfig(cmd)
|
plugin_env.ParseConfig(cmd)
|
||||||
|
cmd = 'pkg-config libpq --libs --static'
|
||||||
|
try:
|
||||||
|
plugin_env.ParseConfig(cmd)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
# Link Library to Dependencies
|
# Link Library to Dependencies
|
||||||
libraries = copy(plugin_env['LIBS'])
|
libraries = copy(plugin_env['LIBS'])
|
||||||
|
|
Loading…
Reference in a new issue