Skip to content

Commit

Permalink
Enable static libcurl linking
Browse files Browse the repository at this point in the history
  • Loading branch information
dtretyakov committed Jan 25, 2024
1 parent dd9b42e commit 3c4dcd6
Show file tree
Hide file tree
Showing 419 changed files with 149,234 additions and 154 deletions.
9 changes: 2 additions & 7 deletions ktor-client/ktor-client-curl/build.gradle.kts
Expand Up @@ -29,14 +29,9 @@ kotlin {
includeDirs.headerFilterOnly(paths)
}

createCInterop("libcurl", listOf("macosArm64")) {
createCInterop("libcurl", listOf("macosArm64", "linuxArm64")) {
defFile = File(projectDir, "desktop/interop/libcurl_arm64.def")
includeDirs.headerFilterOnly(paths)
}

createCInterop("libcurl", listOf("linuxArm64")) {
defFile = File(projectDir, "desktop/interop/libcurl_linux_arm64.def")
includeDirs.headerFilterOnly(listOf("desktop/interop/linuxArm64/include/"))
includeDirs.headerFilterOnly(listOf("desktop/interop/${ideaTarget().name}/include/"))
}

sourceSets {
Expand Down
41 changes: 22 additions & 19 deletions ktor-client/ktor-client-curl/desktop/interop/libcurl_arm64.def
Expand Up @@ -2,23 +2,26 @@ package = libcurl
headers = curl/curl.h
headerFilter = curl/*

linkerOpts.osx = -lcurl \
-L/usr/lib64 \
-L/usr/lib/x86_64-linux-gnu \
-L/opt/local/lib \
-L/usr/local/lib \
-L/opt/homebrew/opt/curl/lib \
-L/usr/local/opt/curl/lib
compilerOpts = -DCURL_STATICLIB
linkerOpts = -lcurl -liconv

compilerOpts.osx = -I/opt/homebrew/opt/curl/include/ \
-I/usr/bin/ \
-I/usr/local/include/ \
-I/usr/include/ \
-I/usr/local/Cellar/curl/7.83.1/include/ \
-I/usr/local/Cellar/curl/7.81.0/include/ \
-I/usr/local/Cellar/curl/7.80.0_1/include/ \
-I/usr/local/Cellar/curl/7.80.0/include/ \
-I/usr/local/Cellar/curl/7.62.0/include/ \
-I/usr/local/Cellar/curl/7.63.0/include/ \
-I/usr/local/Cellar/curl/7.65.3/include/ \
-I/usr/local/Cellar/curl/7.66.0/include/
libraryPaths.linux = desktop/interop/linuxArm64/lib/
libraryPaths.osx = desktop/interop/macosArm64/lib/

staticLibraries = \
libcurl.a \
libcares.a \
libnghttp3.a \
libngtcp2_crypto_quictls.a \
libngtcp2.a \
libnghttp2.a \
libidn2.a \
libunistring.a \
libssh2.a \
libssl.a \
libcrypto.a \
libz.a \
libpsl.a \
libzstd.a \
libbrotlidec.a \
libbrotlicommon.a \

This file was deleted.

0 comments on commit 3c4dcd6

Please sign in to comment.