File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed
Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change @@ -19,4 +19,43 @@ GDAL_ENABLE_DRIVER_JP2GROK set to on
1919
2020CMAKE_PREFIX_PATH
2121/home/FOO/bin/grok
22+ ```
23+
24+ # Install GDAL from source on Windows (with Visual Studio 2026)
25+
26+ 1 . Install miniconda
27+
28+ 2 . Open a conda prompt (not PowerShell)
29+
30+ ## Install environment
31+
32+ ```
33+ conda create -n gdal-src python=3.11 cmake swig numpy pytest -c conda-forge
34+ conda activate gdal-src
35+ conda install -c conda-forge --only-deps libgdal-core
36+ conda install -c conda-forge openjpeg ninja
37+ ```
38+
39+ ## Clone GDAL
40+
41+ ```
42+ mkdir src
43+ cd src
44+ git clone https://github.com/OSGeo/gdal.git
45+ cd gdal
46+ git checkout v3.10.2 # or v3.11.x / main for latest
47+ ```
48+
49+ ## Build GDAL with Ninja
50+
51+ ```
52+ mkdir build
53+ cd build
54+
55+ call "C:\Program Files\Microsoft Visual Studio\18\Community\VC\Auxiliary\Build\vcvarsall.bat" x64
56+
57+ cmake .. -G Ninja -DCMAKE_INSTALL_PREFIX="%CONDA_PREFIX%" -DPython3_EXECUTABLE="%CONDA_PREFIX%\python.exe" -DGDAL_USE_EXTERNAL_LIBS=ON -DGDAL_BUILD_OPTIONAL_DRIVERS=ON -DOGR_BUILD_OPTIONAL_DRIVERS=ON -DBUILD_TESTING=OFF
58+
59+ cmake --build . --config Release --parallel 16
60+ cmake --install . --config Release
2261```
You can’t perform that action at this time.
0 commit comments