Dominique Belhachemi wrote:
i would like to add a FindXXX.cmake to each of my library packages.

Let's compare CMake with pkgconfig. A package containing a library is
responsible to put a .pc file into /usr/lib/pkgconfig/
[snip]
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.

There is no point in providing a FindXXX.cmake file with your package
because the project finding XXX would need to locate FindXXX.cmake first.
A FindXXX.cmake module is used for packages that do not provide cmake
packaging files, and has to come with the client project or with CMake.

If your package is CMake-aware then it should install a CMake package file:

  http://www.cmake.org/Wiki/CMake_2.6_Notes#Packages

This file is found by the find_package command with no help from a
FindXXX.cmake file at all.

Where can I put my custom FindXXX.cmake files ? Is it OK to write in /usr/share/cmake-2.6/Modules/ ??

No.  That is for CMake's installation.

-Brad

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to