[QGIS-Developer] Compiling against homebuilt GDAL

Matthias Kuhn matthias at opengis.ch
Wed Feb 28 23:52:36 PST 2024


On Wed, Feb 28, 2024 at 7:45 PM Even Rouault via QGIS-Developer <
qgis-developer at lists.osgeo.org> wrote:

> and then when configuring QGIS, use GDAL_DIR=$HOME/install-gdal-3.7.2  .
> I'm not totally sure about that last part. may require tweaking. you could
> alter the PATH to point to $HOME/install-gdal-3.7.2/bin so that
> "gdal-config" from your installed GDAL is picked up
>

It will first try to locate GDAL via cmake config (
https://github.com/qgis/QGIS/blob/master/cmake/FindGDAL.cmake#L16). Only if
that fails it will fall back to the gdal-config executable.

To help cmake find a package on a custom install prefix, refer to
https://cmake.org/cmake/help/latest/command/find_package.html#config-mode-search-procedure

in your case I'd suggest using `-D GDAL_ROOT=$HOME/install-gdal-3.7.2`
after installing

Matthias
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20240229/135097db/attachment.htm>


More information about the QGIS-Developer mailing list