[gdal-dev] cmake ignores EXPAT_INCLUDE_DIR & EXPAT_LIBRARY
Kai Pastor, DG0YT
dg0yt at darc.de
Thu Jul 7 23:57:25 PDT 2022
Am 08.07.22 um 02:38 schrieb Nik Sands:
> ==========
> -- Configuring done
> -- Generating done
> CMake Warning:
> Manually-specified variables were not used by the project:
>
> EXPAT_INCLUDE_DIR
> EXPAT_LIBRARY
>
>
> -- Build files have been written to: ...
> ==========
>
> Why would it be ignoring these arguments and how can I get it to use my own libexpat instead of the default SDK libexpat?
Such arguments are used by "Find-module Packages". However, the Modern
CMake approach for is "Config-file Packages". For expat, GDAL prefers
config (expat-config.cmake, expatConfig.cmake) providing targets named
expat::expat or EXPAT::EXPAT.
To use your own expat, make sure it has a config file which it is found
via the search procedure, or use `EXPAT_ROOT`.
You can read more in the CMake documentation for command `find_package`,
in cmake-packages or in "Using Dependencies Guide".
Kai
More information about the gdal-dev
mailing list