<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Add -DCMAKE_PREFIX_PATH="$CONDA_PREFIX" to your CMake invokation
(assuming your have activate your Conda environment, so
CONDA_PREFIX is set)</p>
<p>My suggestion is inspired from our CI Conda based Windows build:
<a class="moz-txt-link-freetext" href="https://github.com/OSGeo/gdal/blob/7fc7bb59d2b2de1dca03dd18c14005f2b64adb49/.github/workflows/cmake_builds.yml#L463">https://github.com/OSGeo/gdal/blob/7fc7bb59d2b2de1dca03dd18c14005f2b64adb49/.github/workflows/cmake_builds.yml#L463</a></p>
<p>You should also probably clear your existing CMakeCache.txt
before doing the abve, to avoid mixing with variables set from
your previous experiments<br>
</p>
<div class="moz-cite-prefix">Le 25/09/2023 à 16:21, Abel Pau a
écrit :<br>
</div>
<blockquote type="cite"
cite="mid:AS8PR07MB8168624CB7584B87D8E87A72A2FCA@AS8PR07MB8168.eurprd07.prod.outlook.com">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style>@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman",serif;}a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}p
{mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:12.0pt;
font-family:"Times New Roman",serif;}pre
{mso-style-priority:99;
mso-style-link:"HTML con formato previo Car";
margin:0cm;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";}p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:12.0pt;
font-family:"Times New Roman",serif;}span.EstiloCorreo19
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:#1F497D;}span.EstiloCorreo20
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:#1F497D;}span.EstiloCorreo21
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:windowtext;}span.HTMLconformatoprevioCar
{mso-style-name:"HTML con formato previo Car";
mso-style-priority:99;
mso-style-link:"HTML con formato previo";
font-family:Consolas;}span.EstiloCorreo24
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:#1F497D;}.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}div.WordSection1
{page:WordSection1;}</style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"
lang="EN-US">Hi Even,<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"
lang="EN-US">I really appreciate your help.<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"
lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"
lang="EN-US">I prefer going by the easy way so once
installed miniconda and applied all the described in
download.htm.<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"
lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"
lang="EN-US">To have the EXPAT installed I do that: conda
install expat<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"
lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"
lang="EN-US">And the, when I try the cmake .. some issues
appear<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"
lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"
lang="EN-US">D:\GitHub-repository\GDAL\build>cmake ..<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"
lang="EN-US">-- Selecting Windows SDK version 10.0.19041.0
to target Windows 10.0.19045.<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"
lang="EN-US">-- GDAL_VERSION = 3.8.0dev<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"
lang="EN-US">-- GDAL_ABI_FULL_VERSION = 38<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"
lang="EN-US">-- GDAL_SOVERSION =<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"
lang="EN-US">-- Could NOT find MSSQL_NCLI (missing:
MSSQL_NCLI_LIBRARY MSSQL_NCLI_INCLUDE_DIR
MSSQL_NCLI_VERSION)<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"
lang="EN-US">-- Could NOT find MSSQL_ODBC (missing:
MSSQL_ODBC_LIBRARY MSSQL_ODBC_INCLUDE_DIR
MSSQL_ODBC_VERSION)<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"
lang="EN-US">-- Could NOT find MySQL (missing: MYSQL_LIBRARY
MYSQL_INCLUDE_DIR)<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"
lang="EN-US">-- Could NOT find CURL (missing: CURL_LIBRARY
CURL_INCLUDE_DIR)<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"
lang="EN-US">-- Could NOT find Iconv (missing: Iconv_LIBRARY
Iconv_CHARSET_LIBRARY Iconv_INCLUDE_DIR)<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"
lang="EN-US">-- Could NOT find LibXml2 (missing:
LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR)<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"
lang="EN-US">-- Could NOT find EXPAT (missing: EXPAT_DIR)<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"
lang="EN-US">-- Could NOT find EXPAT (missing: EXPAT_LIBRARY
EXPAT_INCLUDE_DIR)<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"
lang="EN-US">CMake Error at
cmake/helpers/CheckDependentLibraries.cmake:202 (message):<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"
lang="EN-US"> Configured to use EXPAT, but not found<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"
lang="EN-US">Call Stack (most recent call first):<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"
lang="EN-US">
cmake/helpers/CheckDependentLibraries.cmake:348
(gdal_check_package)<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"
lang="EN-US"> gdal.cmake:265 (include)<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"
lang="EN-US"> CMakeLists.txt:280 (include)<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"
lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"
lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"
lang="EN-US">-- Configuring incomplete, errors occurred!<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"
lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"
lang="EN-US">D:\GitHub-repository\GDAL\build><o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"
lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"
lang="EN-US">There is something I don’t understand because I
don’t know what to do now.<o:p></o:p></span></p>
<p class="MsoNormal"><b><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"
lang="EN-US">Why after doing an gdal_master_env and
installing everything and expat it doesn’t work?<o:p></o:p></span></b></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"
lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"
lang="EN-US">Once again, I appreciate your help :)<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"
lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"
lang="EN-US"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1
1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif"
lang="ES">De:</span></b><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif"
lang="ES"> Even Rouault
<a class="moz-txt-link-rfc2396E" href="mailto:even.rouault@spatialys.com"><even.rouault@spatialys.com></a>
<br>
<b>Enviado el:</b> dilluns, 25 de setembre de 2023 14:30<br>
<b>Para:</b> Abel Pau <a class="moz-txt-link-rfc2396E" href="mailto:a.pau@creaf.uab.cat"><a.pau@creaf.uab.cat></a>; gdal
dev <a class="moz-txt-link-rfc2396E" href="mailto:gdal-dev@lists.osgeo.org"><gdal-dev@lists.osgeo.org></a><br>
<b>Asunto:</b> Re: [gdal-dev] About installing EXPAT<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p>Abel,<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"
lang="EN-US">In Cmakefile.txt of the project I’ve
configured this (below
</span><span
style="font-size:9.5pt;font-family:Consolas;color:green">#
Developer may want to specify some variable to find proper
version.</span><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">)</span><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"
lang="EN-US">:</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.5pt;font-family:Consolas;color:blue">set</span><span
style="font-size:9.5pt;font-family:Consolas;color:black">(EXPAT_INCLUDE_DIR
</span><span
style="font-size:9.5pt;font-family:Consolas;color:#A31515">"D:/GitHub-repository/libexpat/expat/lib"</span><span
style="font-size:9.5pt;font-family:Consolas;color:black">)</span><o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.5pt;font-family:Consolas;color:blue">set</span><span
style="font-size:9.5pt;font-family:Consolas;color:black">(EXPAT_LIBRARY
</span><span
style="font-size:9.5pt;font-family:Consolas;color:#A31515">"D:/GitHub-repository/libexpat/expat/build/Debug/libexpatd.lib"</span><span
style="font-size:9.5pt;font-family:Consolas;color:black">)</span><o:p></o:p></p>
</blockquote>
<p class="MsoNormal">Is this .lib a static library, or an import
library of the .dll ? My assumption (I may be wrong) is that
it is an import lib of the .dll. In which case you must not
set EXPAT_USE_STATIC_LIBS<br>
<br>
<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.5pt;font-family:Consolas;color:blue">set</span><span
style="font-size:9.5pt;font-family:Consolas;color:black">(EXPAT_LIBRARY
</span><span
style="font-size:9.5pt;font-family:Consolas;color:#A31515">"D:/GitHub-repository/libexpat/expat/build/Debug/libexpatd.dll"</span><span
style="font-size:9.5pt;font-family:Consolas;color:black">)</span><o:p></o:p></p>
</blockquote>
<p>That won't work. This needs to be a .lib<o:p></o:p></p>
<p>You'd better run cmake again on expat with a
-DCMAKE_INSTALL_PREFIX=d:/install-prefix and run "cmake
--build . --target install", and then when building GDAL, use
"cmake .. -DCMAKE_PREFIX_PATH=d:/install-prefix", so it
automatically configures things from what is found in
d:/install-prefix<o:p></o:p></p>
<p>You could also potentially use vcpkg or conda to install GDAL
dependencies instead of building them from scratch:
<a href="https://gdal.org/download.html"
moz-do-not-send="true" class="moz-txt-link-freetext">https://gdal.org/download.html</a><o:p></o:p></p>
<p>Even<o:p></o:p></p>
<pre>-- <o:p></o:p></pre>
<pre><a href="http://www.spatialys.com" moz-do-not-send="true" class="moz-txt-link-freetext">http://www.spatialys.com</a><o:p></o:p></pre>
<pre>My software is free, but my time generally not.<o:p></o:p></pre>
</div>
</blockquote>
<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>