[gdal-dev] Building on windows
Even Rouault
even.rouault at spatialys.com
Thu Mar 7 03:58:17 PST 2024
Le 07/03/2024 à 09:41, Abel Pau via gdal-dev a écrit :
>
> Hi,
>
> I am a windows and VS2019 user anc C/C++ developer and I asked this
> question myself a long time ago.
>
> Finally the best way for me was:
>
> 1)Install vcpkg https://vcpkg.io/en/getting-started and install this
> on c:/dev/vcpkg. Follow their instructions. And then gdal instructions
> (https://gdal.org/download.html#vcpkg)
>
> a.git clone https://github.com/Microsoft/vcpkg.git
>
> b..\vcpkg\bootstrap-vcpkg.bat
>
> c.vcpkg integrate install
>
> d..\vcpkg install gdal --triplet=x64-windows
>
> 2)Use this line to install all gdal needs: vcpkg --triplet x64-windows
> install curl expat geos lerc libdeflate libgeotiff libiconv libpng
> libxml2 openssl proj qhull sqlite3[rtree] xerces-c zlib
>
> 3)Install python using vcpkg: vcpkg install python3
>
> 4)Clone gdal https://github.com/OSGeo/gdal to some directory (let’s
> call it “$Gdal$”)
>
> 5)Set the system environment variable GDAL_DATA to $Gdal$\build\data
>
> 6)Go to the folder $Gdal$ in cmd and
>
> a.cmake -B build -S .
> -DCMAKE_TOOLCHAIN_FILE=C:/dev/*vcpkg/vcpkg*/scripts/buildsystems/vcpkg.cmake
> (<-- look for this file in your vcpkg installation: I have two vcpkg
> levels, I don’t know why but I don’t care)
>
> b.cmake --build build
>
> It should work. If it doesn’t, tell us and let’s see if I missed
> something.
>
> If it’s worth perhaps we can document it in somewhere on gdal page,
> cause it’s a long journey to set all this. It’s not clear anywhere.
>
Could be a new paragraph at bottom of
https://gdal.org/development/dev_environment.html . We've already
something similar for Conda based builds
--
http://www.spatialys.com
My software is free, but my time generally not.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20240307/7b730762/attachment.htm>
More information about the gdal-dev
mailing list