<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">These instructions seem unaware of the
fact that builds are configured by passing input variables to
cmake. In particular it is not necessary to edit CMakeList.txt,
and some of the environment variables have no effect at all.</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">I don't know how this is done in CLion.
On the command line, you would use `-D` parameters, i.e.</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">cmake ...
"-DSWIG_EXECUTABLE=D:\utils\swig\swig.exe"
"-DPROJ_ROOT=c:\OSGEO4W" ...</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">These variables are cached in the build
directory. So you can easily have different configurations in
different build directories for the same source directory, without
having to remember setting environment variables.<br>
</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">Kai<br>
</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">Am 19.04.23 um 16:42 schrieb Luis
Felipe Romero:<br>
</div>
<blockquote type="cite"
cite="mid:5dd6e23e-8803-2208-1a04-79b2343b13c9@uma.es">Hi all
<br>
<br>
I'll tell you about my experience installing the GDAL development
environment on a fresh Windows 11 computer using CMake with CLION.
I'm only sharing this so that in the future, this message may be
useful to someone.
<br>
<br>
Before installing GDAL, prepare three tools (always installed the
latest version for all users, as administrator):
<br>
<br>
Python for Windows, as admin, adding the PATH to the
environment variable. Ver. 3.11
<br>
Git for Windows (Updating PATH)
<br>
CLion for Windows 20231.1 (PATH as well)
<br>
OSGEO4W (I installed it without knowing it was necessary. I
needed QGIS, although later I found out that it was necessary for
some dependencies)
<br>
<br>
After opening the GDAL folder with CLion, I found out that I
needed some additional tools (Swig and Proj)
<br>
<br>
Swig for Windows.
<br>
<br>
Simply unzip the swigwin-4.1.1.zip folder and set the
following variable:
<br>
<br>
SWIG_EXECUTABLE=D:\utils\swig\swig.exe
<br>
<br>
Proj for Windows and some dependencies:
<br>
<br>
After reading around, I found out that it was recommended to
use OSGEO4W, and later I found out that I needed to install the
sources and some dependencies.
<br>
<br>
proj
<br>
proj-devel
<br>
libtiff
<br>
libtiff-devel
<br>
libgeotiff
<br>
libgeotiff-devel
<br>
curl
<br>
curl-devel
<br>
<br>
Previously, I had already installed this with OSGEO4W, so there
could be some more dependencies installed:
<br>
<br>
gdal
<br>
qgis
<br>
<br>
Finally, I defined these environment variables:
<br>
<br>
PROJ_INCLUDE_DIR=C:\OSGeo4W\include
<br>
PROJ_LIBRARY_RELEASE=C:\OSGeo4W\bin\proj_9_2.dll
<br>
<br>
And add this line in CMakeLists.txt below project(gdal LANGUAGES C
CXX)
<br>
<br>
set(PROJ_ROOT "c:\OSGEO4W")
<br>
<br>
After refreshing CMake, it compiled smoothly, without any
problems.
<br>
<br>
Thank you, Javier Jimenez Shaw, for your tips :)
<br>
<br>
_______________________________________________
<br>
gdal-dev mailing list
<br>
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
<br>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/gdal-dev">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
<br>
</blockquote>
<p><br>
</p>
</body>
</html>