Modern versions of CMake support a better way of finding dependencies,
known as the Config file. It is similar to pkg_config .pc files and is
installed alongside the package. Then clients can just add:
find_package(EXPAT CONFIG)
add_executable(foo ...)
target_link_libraries(foo EXPAT::expat)
The client target will get all the correct include paths and compile
definitions necessary to work with the expat target, automatically.
Hello alamaison,
for a quick reply let me say that:
Last edit: Sebastian Pipping 2016-04-17
Cmake 3.5.1 is very recent. But according to
https://cmake.org/cmake/help/v3.0/module/FindEXPAT.html
the FindEXPAT.cmake module existed in 3.0.2 already, which is what e.g. current Debian stable ships.
I'm not sure what cmake's policy is here (do they prefer to move checks downstream and deprecate their own version eventually e.g.?) but assuming they're fine with keeping that check and it works well, it seems to me nothing needs to be done on expat's side.
No reply for more than a year, closing as obsolete.