<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hi,</p>
<p>if you define both <span>GDAL_USE_JSONC=ON and </span><span><span>GDAL_USE_JSONC_INTERNAL=ON,
the use of the internal variant will take precedence. It would
be a good contribution to mention that in
<a class="moz-txt-link-freetext" href="https://gdal.org/build_hints.html">https://gdal.org/build_hints.html</a></span></span></p>
<p><span><span>Technically, the report is correct: external json-c
has been found. But it is not used. The standard CMake
FeatureSummary functionality that is used doesn't take that
subtlety into account. One could possible decide to remove the
external component from the list of detected component when
there's a corresponding _INTERNAL=ON setting. If you feel it
would be good, please file an issue about that. Bonus point if
accompanied with a patch. The solution would probably to add
some code to all </span></span><span><span><code
class="docutils literal notranslate"><span class="pre">PACKAGES_FOUND</span></code>
before the call to feature_summary() (cf
<a class="moz-txt-link-freetext" href="https://cmake.org/cmake/help/latest/module/FeatureSummary.html">https://cmake.org/cmake/help/latest/module/FeatureSummary.html</a>)</span></span></p>
<p><span><span>Even<br>
</span></span></p>
<div class="moz-cite-prefix">Le 15/03/2022 à 09:20, Javier Jimenez
Shaw a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:CADRrdKuYjouT9kui5SRoY04Gey18_a_t-gy=EPvi8NPrM6hGDQ@mail.gmail.com">
<div dir="ltr">
<div>Hi</div>
<div><br>
</div>
<div>Keep working with CMake and <span>GDAL_USE_EXTERNAL_LIBS=OFF</span></div>
<div>Now I want to enable json-c</div>
<div><br>
</div>
<div>If I do not say anything, I get this message:</div>
<div><span>-- JSONC has been found, but is disabled due to
GDAL_USE_EXTERNAL_LIBS=OFF. Enable it by setting
GDAL_USE_JSONC=ON</span></div>
<div><br>
</div>
<div>If I say <br>
</div>
<div><span>GDAL_USE_JSONC=ON<br>
</span></div>
<div><span>GDAL_USE_JSONC_INTERNAL=ON</span></div>
<div><br>
</div>
<div>the log message is</div>
<div><span>-- Could NOT find JSONC (missing: JSONC_DIR)</span></div>
<div><span>-- Found JSONC:
/usr/lib/x86_64-linux-gnu/libjson-c.so</span></div>
<div>and later</div>
<div><span>-- The following OPTIONAL packages have been found:</span></div>
<div><span>...<br>
</span></div>
<div><span>* JSONC <br>
json-c library (external)</span></div>
<div><br>
</div>
<div><br>
</div>
<div>Looks like I am doing something wrong, or the "internal"
configuration is ignored.</div>
<div><br>
</div>
<div>In my computer I have libjson-c installed, but in CI it is
not. I want to reproduce the same behaviour in both.</div>
<div><br>
</div>
<div>Thanks<br>
</div>
<div>
<div>
<div dir="ltr" class="gmail_signature"
data-smartmail="gmail_signature">.___ ._ ..._ .. . ._.
.___ .. __ . _. . __.. ... .... ._ .__<br>
Entre dos pensamientos racionales <br>
hay infinitos pensamientos irracionales.<br>
<br>
</div>
</div>
</div>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
gdal-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/gdal-dev">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
</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>