diff options
author | bptato <nincsnevem662@gmail.com> | 2023-08-26 20:11:52 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2023-08-26 20:11:52 +0200 |
commit | ce87773b7ec3fbf86223eb3e046670391a7ad89d (patch) | |
tree | 4e68cc81cd243e28bb765fbdaa885e1064ca0a87 /src/bindings | |
parent | e0950d5f6eed46509246b4820ac478a5920354da (diff) | |
download | chawan-ce87773b7ec3fbf86223eb3e046670391a7ad89d.tar.gz |
Allow overriding libcurl name
for better compatibility with curl-impersonate
Diffstat (limited to 'src/bindings')
-rw-r--r-- | src/bindings/curl.nim | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/bindings/curl.nim b/src/bindings/curl.nim index ed2057eb..bab180f5 100644 --- a/src/bindings/curl.nim +++ b/src/bindings/curl.nim @@ -1,7 +1,13 @@ const curllib = (func(): string = - when defined(windows): return "libcurl.dll" - elif defined(macos): return "libcurl(|.4|.4.8.0).dylib" - else: return "libcurl.so(|.4|.4.8.0)" # assume posix + const curlLibName {.strdefine.} = "" + when curlLibName != "": + return curlLibName + elif defined(windows): + return "libcurl.dll" + elif defined(macos): + return "libcurl(|.4|.4.8.0).dylib" + else: # assume posix + return "libcurl.so(|.4|.4.8.0)" )() const |