FindGDAL

Find Geospatial Data Abstraction Library (GDAL).

IMPORTED Targets

Added in version 3.14.

This module defines IMPORTED target GDAL::GDAL if GDAL has been found.

Result Variables

This module will set the following variables in your project:

GDAL_FOUND

True if GDAL is found.

GDAL_INCLUDE_DIRS

Include directories for GDAL headers.

GDAL_LIBRARIES

Libraries to link to GDAL.

GDAL_VERSION

Added in version 3.14: The version of GDAL found.

Cache variables

The following cache variables may also be set:

GDAL_LIBRARY

The libgdal library file.

GDAL_INCLUDE_DIR

The directory containing gdal.h.

Hints

Set GDAL_DIR or GDAL_ROOT in the environment to specify the GDAL installation prefix.

The following variables may be set to modify the search strategy:

FindGDAL_SKIP_GDAL_CONFIG

If set, gdal-config will not be used. This can be useful if there are GDAL libraries built with autotools (which provide the tool) and CMake (which do not) in the same environment.

GDAL_ADDITIONAL_LIBRARY_VERSIONS

Extra versions of library names to search for.