In many cmake find modules, we find INCLUDE("${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake")
I would like to do the same thing but from the CMakeLists of my project.
The problem is that ${CMAKE_CURRENT_LIST_DIR} is pointing to the directory of my project… And FindPackageHandleStandardArgs.cmake is in /usr/share/cmake-2.8/Modules/.
Is there a CMake variable that is pointing to the cmake module directory ?
If not, how to do that in my CMakeLists (I want that to be portable and not to be “hardcoded”) ?
Thank you very much.
If a module file is specified, the include command will search the CMake module directory automatically. Just use: