From bada3302023770ab4075a9a823ab41f447602103 Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Mon, 6 Nov 2023 19:03:14 +0100 Subject: [PATCH] [meson] allow to find curl without pkgconfig Especially for curl for Windows. --- meson.build | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index be9555a5..167dccd6 100644 --- a/meson.build +++ b/meson.build @@ -356,7 +356,10 @@ gnutlsdeps = [] ssldeps = [] if conf_data.get('CONFIG_OPENSSL') - ssldeps = dependency('openssl', static: st) + ssldeps = dependency('openssl', static: st, required: false) + if not ssldeps.found() + ssldeps = compiler.find_library('ssl', static: st, dirs: [get_option('prefix')+'/lib', '/usr/local/lib']) + endif deps += ssldeps conf_data.set('USE_OPENSSL', true) conf_data.set('CONFIG_GNUTLS', false) @@ -432,7 +435,10 @@ if conf_data.get('CONFIG_ECMASCRIPT_SMJS') or conf_data.get('CONFIG_QUICKJS') or endif if not conf_data.get('CONFIG_LIBCURL') and get_option('libcurl') - curldeps = dependency('libcurl', static: st) + curldeps = dependency('libcurl', static: st, required: false) + if not curldeps.found() + curldeps = compiler.find_library('curl', static: st, dirs: [get_option('prefix')+'/lib', '/usr/local/lib']) + endif deps += curldeps conf_data.set('CONFIG_LIBCURL', true) endif