Open aljen opened 7 months ago
@aljen Thanks for the PR! I'm not a windows (nor vcpkg) guy, so not sure how to review this. I'll reach out to the community in discord and see if anyone volunteers.
@aljen Thanks for the PR! I'm not a windows (nor vcpkg) guy, so not sure how to review this. I'll reach out to the community in discord and see if anyone volunteers.
No problem! :) I could walk you through it, btw it's easier to follow if in 'files changed' you click gear icon and hide whitespace changes. It's just an additional if, which if detected that we want to use gdal from VCPKG, it helps rust see libs from it, and in case of static variant, adds missing system's dlls dependencies :)
Ping @aljen can you take another look at this?
Yeah, I planned to do this over the weekend, I had my plate full lately :)
[X] I agree to follow the project's code of conduct.
[X] I added an entry to
CHANGES.md
if knowledge of this change could be valuable to users.Set
GDAL_VCPKG
environment variable to1
to enable VCPKG support.Set
GDAL_VCPKG_TRIPLET
to the desired triplet (e.g.x64-windows-static
).VCPKG_ROOT
must point to the VCPKG root directory.Install GDAL with
vcpkg install gdal:x64-windows-static
(or the desired triplet).Install pkgconf with
vcpkg install pkgconf:x64-windows-static
.Set
PKG_CONFIG
to the pkgconf executable (e.g.%VCPKG_ROOT%\installed\x64-windows-static\tools\pkgconf\pkgconf.exe
).Set
PKG_CONFIG_PATH
to%VCPKG_ROOT%\installed\x64-windows-static\lib\pkgconfig
.When building non-static version, copy missing dlls from
%VCPKG_ROOT%\installed\x64-windows\bin
to the executable directory.