Suppose you're developing some library, myproj, using CMake for build configuration; supporting the cmake --install (using install() commands); and supporting use of myproj with CMake config mode, i.e. by making relevant .cmake files accessible to dependent projects.
Now, ,given an install root directory - where should I install my project's configuration .cmake files? Is there an idiomatic standard(ish) location?
- Sorush Khajepor's R&D blog suggests
${LIB_INSTALL_DIR}/cmake/myproj- and it's the newest. - Foonathan's blog suggests placing the config
.cmakefiles in${LIB_INSTALL_DIR}/. So does Falkor's blog. - The documentation page for the
CMakePackageConfigHelpersmodule suggests:${LIB_INSTALL_DIR}/myproj/cmake.
What's the most popular/idiomatic choice? And what are its pros and cons relative to the other ones?