gdal-config - use both --libs and --dep-libs when RUNTIME_LINK

+ `ogr.input` needs `pkg-config libpq --libs --static`
This commit is contained in:
Artem Pavlenko 2024-04-03 18:18:13 +01:00
parent 83f833f1ce
commit c2c6d2ed60
2 changed files with 9 additions and 2 deletions

View file

@ -38,9 +38,10 @@ plugin_env['LIBS'] = []
plugin_env.Append(LIBS=env['PLUGINS']['gdal']['lib'])
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)
# Link Library to Dependencies
libraries = copy(plugin_env['LIBS'])

View file

@ -43,8 +43,14 @@ plugin_env['LIBS'] = []
plugin_env.Append(LIBS=env['PLUGINS']['ogr']['lib'])
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)
cmd = 'pkg-config libpq --libs --static'
try:
plugin_env.ParseConfig(cmd)
except:
pass
# Link Library to Dependencies
libraries = copy(plugin_env['LIBS'])