<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Thomas,<br>
</p>
<div class="moz-cite-prefix">Le 28/02/2024 à 19:33, Thomas Larsen
Wessel via QGIS-Developer a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:CAKKm1vFUcyz8eotHvh=Oc3EXYfqnue823S_vBDYWw+o+RPwXPQ@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">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:
<div><br>
</div>
<div>git clone <a class="moz-txt-link-abbreviated" href="mailto:git@github.com:qgis/QGIS.git">git@github.com:qgis/QGIS.git</a></div>
<div>cd QGIS</div>
<div>mkdir build</div>
<div>cd build</div>
<div>GDAL_DIR=/home/velle/gdal3.7.2/build cmake ..</div>
<div><br>
</div>
<div>The output contains the following error for GDAL:</div>
<div><br>
</div>
<div>CMake Error at
/home/velle/gdal-3.7.2/build/GDALConfig.cmake:24 (include):<br>
</div>
<div> include could not find requested file:<br>
/home/velle/gdal-3.7.2/build/GDAL-targets.cmake<br>
Call Stack (most recent call first):<br>
cmake/FindGDAL.cmake:16 (find_package)<br>
CMakeLists.txt:365 (find_package)<br>
<br>
Could someone please tell me if I'm even doing it right?<br>
</div>
</div>
</blockquote>
<p>You need to *install* GDAL first. You can't just point QGIS to
the GDAL build directory<br>
</p>
<p>So in the GDAL build directory, do "cmake ..
-DCMAKE_INSTALL_PREFIX=$HOME/install-gdal-3.7.2 ; make -j$(nproc);
make install"</p>
<p>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<br>
</p>
<p>Even</p>
<span style="white-space: pre-wrap">
</span>
<pre class="moz-signature" cols="72">--
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
</body>
</html>