[CMake] Feature Request: Additional directory for customized/private CMake modules

Dominique Belhachemi domibel at cs.tu-berlin.de
Fri Apr 3 12:05:37 EDT 2009


I am looking for a more generally solution. I don't want to touch files 
like CMakeLists.cmake .

Let's compare CMake with pkgconfig. A package containing a library is 
responsible to put a .pc file into /usr/lib/pkgconfig/

"File"                                   "Packages"
/usr/lib/pkgconfig/cspi-1.0.pc           libatspi-dev
/usr/lib/pkgconfig/gtk+.pc               libgtk1.2-dev
/usr/lib/pkgconfig/json-glib-1.0.pc      libjson-glib-dev
/usr/lib/pkgconfig/libepc-1.0.pc         libepc-dev
/usr/lib/pkgconfig/vala-1.0.pc           libvala-dev

For cmake this could look like this:
"File"                                     "Packages"
/usr/lib/cmake/Findcspi.cmake              libatspi-dev
/usr/lib/cmake/Findgtk+.cmake              libgtk1.2-dev
/usr/lib/cmake/Findjson-glib.cmake         libjson-glib-dev
/usr/lib/cmake/Findlibepc.cmake            libepc-dev
/usr/lib/cmake/Findvala.cmake              libvala-dev

It would be nice to let CMake search for Modules in this 
directory per default additionally to CMake's standard module
directory.

A package knows best where to find its own include and library 
files. To maintain a FindXXX.cmake file should not be the task of CMake.

Best,
Dominique



More information about the CMake mailing list