You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am having the same need as @ian-p-cooke had 4 years ago 👉 #221.
I decided to use mingw64 to build curl-4.dll on Windows instead of vcpkg. It works as expected following these steps:
installing msys2
installing base-devel and mingw-w64-x86_64-toolchain
building curl 7.87 schannel from source for mingw64
Then I build my rust app with crate-sys dependency with these prerequisites:
adding mingw64/bin dir to path
rust toolchain stable-gnu
I expected curl-sys to link my mingw64/curl-4.dll, but it does not permit the use of mingw64's pkg_config. Instead, the crate uses embedded curl 7.86-DEV as mentioned in documentation.
So, to achieve my goal, I had to update curl-sys/build.rs line 38 like this:
if windows {
if try_vcpkg() {
return;
} else if try_pkg_config() {
return;
}
} else if try_pkg_config() {
return;
}
}
With this update, curl-sys correctly links my rust app with my fresh mingw64/curl-4.dll.
Now that compiling curl with mingw64 is working easily, I think that we could allow curl-sys to use pkg_config instead of vcpkg according to the dev's choice.
The text was updated successfully, but these errors were encountered:
lepapareil
changed the title
Add the ability to use Pkg_config instead of Vcpkg when building with Mingw64 on Windows
Add the ability to use pkg_config instead of vcpkg when building with mingw64 on Windows
Jan 9, 2023
I would also like to be able to use pkg-config on other platforms such as Linux to use the system libcurl, which I have built with aws-lc. This would also allow using curl with HTTP/3 support.
Hi @alexcrichton, and many thks for your work 😀.
I am having the same need as @ian-p-cooke had 4 years ago 👉 #221.
I decided to use
mingw64
to buildcurl-4.dll
on Windows instead ofvcpkg
. It works as expected following these steps:Then I build my rust app with
crate-sys
dependency with these prerequisites:I expected
curl-sys
to link mymingw64/curl-4.dll
, but it does not permit the use of mingw64'spkg_config
. Instead, the crate uses embeddedcurl 7.86-DEV
as mentioned in documentation.So, to achieve my goal, I had to update
curl-sys/build.rs
line38
like this:With this update,
curl-sys
correctly links my rust app with my freshmingw64/curl-4.dll
.Now that compiling curl with mingw64 is working easily, I think that we could allow
curl-sys
to usepkg_config
instead ofvcpkg
according to the dev's choice.The text was updated successfully, but these errors were encountered: