<br><div class="gmail_quote">On Tue, Aug 25, 2009 at 12:47 PM, Andreas Pakulat <span dir="ltr">&lt;<a href="mailto:apaku@gmx.de">apaku@gmx.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">On 25.08.09 12:37:46, David Ojeda wrote:<br>
&gt; I have a shared library that I managed to compile and install using cmake.<br>
&gt; This is working great but now I want to use this library in another<br>
&gt; cmake-based development. Normally, as with any other shared library, I use a<br>
&gt; FindPackage to get the include and linker flags. However, since I am using<br>
&gt; my shared library, I wrote a cmake module. Once again this is working ok and<br>
&gt; I would like to include this module as a part of the files installed by the<br>
&gt; library.<br>
<br>
</div>So you don&#39;t want that, you want it to be either part of cmake or part of<br>
all projects using that library. The reason is simple, if the library is<br>
not installed, its find-module won&#39;t be installed. Hence upon the cmake-run<br>
in the project using the lib you&#39;ll get a cryptic error message that<br>
library_DIR is not set properly. <br></blockquote><div><br>Thank you for your response Andreas,<br><br>Actually I get a not so cryptic error, which says that it does not find the module:<br><br> CMake Warning at CMakeLists.txt:12 (find_package):<br>
  Could not find module Findmylib.cmake or a configuration file for package<br>  mylib.<br><br>  Adjust CMAKE_MODULE_PATH to find Findmylib.cmake or set mylib_DIR to the<br>  directory containing a CMake configuration file for mylib.  The file will<br>
  have one of the following names:<br><br>    mylibConfig.cmake<br>    mylib-config.cmake<br><br><br>So, to my understanding, cmake will search the module at CMAKE_MODULE_PATH<br>or at /usr/share/cmake-2.6/Modules/<br>Does it also search somewhere else such as: /usr/local/share/cmake-2.6/Modules ?<br>
I&#39;ve tried this and apparently it doesn&#39;t search there... (maybe it searches somewhere<br>else?)<br>If cmake does not do this at all... would this be useful? I think so, personally... since<br>usually it is common to install libraries/programs at /usr/local/...<br>
</div></div><br>