Help: Modernize PackageConfigHelpers example
The example shown in the module documentation for CMakePackageConfigHelpers was showing its age, by:
- Hardcoding directory prefixes (
etc/
,lib/
, etc.) instead of using GNUInstallDirs - Handwaving
set()
commands (incorrectly!) as:
set(VAR dir/ ... CACHE )
which should, at the very least, be:
set(VAR dir/ CACHE ... )
- Installing CMake configuration files to
lib/Foo/cmake/
, when current practice favors${CMAKE_INSTALL_LIBDIR}/cmake/Foo/
This updated example addresses all of those issues.
Edited by Frank Dana