From c2c6d2ed60d260e1c3dcda4d64f42259b68a64ac Mon Sep 17 00:00:00 2001 From: Artem Pavlenko Date: Wed, 3 Apr 2024 18:18:13 +0100 Subject: [PATCH] gdal-config - use both --libs and --dep-libs when RUNTIME_LINK + `ogr.input` needs `pkg-config libpq --libs --static` --- plugins/input/gdal/build.py | 3 ++- plugins/input/ogr/build.py | 8 +++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/plugins/input/gdal/build.py b/plugins/input/gdal/build.py index 91f51b0c5..e0ac823f1 100644 --- a/plugins/input/gdal/build.py +++ b/plugins/input/gdal/build.py @@ -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']) diff --git a/plugins/input/ogr/build.py b/plugins/input/ogr/build.py index 06d9fbe6f..6e1b7b24a 100644 --- a/plugins/input/ogr/build.py +++ b/plugins/input/ogr/build.py @@ -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'])