On 02.07.10 14:55:07, Diablo 666 wrote:
> the last problem for today :)
> 
> Assuming I develop a project called Foobar, which consists of some libraries 
> only. To make using these libraries easier, I'd like to create a 
> FindFoobar.cmake file to use with FIND_PACKAGE().
> 
> The problem is that I have a lot of clients which can't install the libraries 
> as root, so have to support non-root installations. How can I use my 
> FindFoobar.cmake file from other projects without having it installed as 
> root? It should be as easy to use as possible.

Usually a FindFoobar.cmake is not supplied with Foobar, but rather with any
project that wants to use Foobar.

That said, there's a better way than FindFoobar, look into the "Config"
mode of find_package. It allows your foobar project to install a few files
in specific locations alongside the library files themselves. Then any
project that wants to use the libs can do a find_package(Foobar) and cmake
will find those config-files (in worst case the user has to specify the
foobar installation prefix in CMAKE_PREFIX_PATH).

Andreas

-- 
Your aim is high and to the right.
_______________________________________________
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