[gdal-dev] CMake and unexpected driver

Javier Jimenez Shaw j1 at jimenezshaw.com
Mon Mar 14 13:05:41 PDT 2022


Hi

I am testing CMake compilation. So far so good. I am setting these CMake
variables:

GDAL_USE_EXTERNAL_LIBS=OFF // disable everything and enable only what I need
GDAL_USE_ICONV=ON // otherwise it does not compile in Ubuntu 20.04
GDAL_USE_EXPAT=ON
GDAL_USE_TIFF=ON
GDAL_USE_GEOTIFF=ON
GDAL_USE_JPEG=ON
GDAL_USE_ZLIB=ON

As you can see, PNG is not enabled. Actually it says:

-- Disabled components:
...
 *PNG component has been detected, but is disabled with GDAL_USE_PNG=OFF

However, in a test application, this statement works:
nullptr != GetGDALDriverManager()->GetDriverByName("PNG")

Why is it able to return a "valid" driver for PNG, when it was not enabled
in the CMake configuration?

Thanks.
.___ ._ ..._ .. . ._.  .___ .. __ . _. . __..  ... .... ._ .__
Entre dos pensamientos racionales
hay infinitos pensamientos irracionales.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20220314/eb796442/attachment.html>


More information about the gdal-dev mailing list