Thomas,

Le 28/02/2024 à 19:33, Thomas Larsen Wessel via QGIS-Developer a écrit :
I have successfully built QGIS and GDAL (3.7.2) separately. Now I want to build QGIS against this GDAL. This is what I tried:

git clone g...@github.com:qgis/QGIS.git
cd QGIS
mkdir build
cd build
GDAL_DIR=/home/velle/gdal3.7.2/build cmake ..

The output contains the following error for GDAL:

CMake Error at /home/velle/gdal-3.7.2/build/GDALConfig.cmake:24 (include):
  include could not find requested file:
    /home/velle/gdal-3.7.2/build/GDAL-targets.cmake
Call Stack (most recent call first):
  cmake/FindGDAL.cmake:16 (find_package)
  CMakeLists.txt:365 (find_package)

Could someone please tell me if I'm even doing it right?

You need to *install* GDAL first. You can't just point QGIS to the GDAL build directory

So in the GDAL build directory, do "cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/install-gdal-3.7.2 ; make -j$(nproc); make install"

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

Even

--
http://www.spatialys.com
My software is free, but my time generally not.
_______________________________________________
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to