[CMake] installing a module

Andreas Pakulat apaku at gmx.de
Tue Aug 25 06:47:49 EDT 2009


On 25.08.09 12:37:46, David Ojeda wrote:
> I have a shared library that I managed to compile and install using cmake.
> This is working great but now I want to use this library in another
> cmake-based development. Normally, as with any other shared library, I use a
> FindPackage to get the include and linker flags. However, since I am using
> my shared library, I wrote a cmake module. Once again this is working ok and
> I would like to include this module as a part of the files installed by the
> library.

So you don't want that, you want it to be either part of cmake or part of
all projects using that library. The reason is simple, if the library is
not installed, its find-module won't be installed. Hence upon the cmake-run
in the project using the lib you'll get a cryptic error message that
library_DIR is not set properly.

Andreas

-- 
Good news from afar can bring you a welcome visitor.


More information about the CMake mailing list