Hi Jakob, <br><br>In your project, you could add the following:<br><br>SET(CMAKE_MODULE_PATH ENV{EXTRA_CMAKE_MODULE_PATH} ${CMAKE_MODULE_PATH})<br><br>Then, you could set the environment variable EXTRA_CMAKE_MODULE_PATH to the central location where you could copy all your common cmake modules, function or macro ... <br>
<br>See <a href="http://www.cmake.org/cmake/help/cmake-2-8-docs.html#variable:CMAKE_MODULE_PATH">http://www.cmake.org/cmake/help/cmake-2-8-docs.html#variable:CMAKE_MODULE_PATH</a><br>and <a href="http://www.cmake.org/cmake/help/cmake-2-8-docs.html#command:set">http://www.cmake.org/cmake/help/cmake-2-8-docs.html#command:set</a><br>
<br>Hth<br>Jc<br><br><br><div class="gmail_quote">On Tue, May 3, 2011 at 9:32 AM, J.S. van Bethlehem <span dir="ltr"><<a href="mailto:j.s.van.bethlehem@astro.rug.nl">j.s.van.bethlehem@astro.rug.nl</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hello,<br>
While trying to create a build-system using CMake for some of my libraries, I notice that I keep using some macros and functions over and over again. I thought it would be nice to put some .cmake-files in some central place on the system (Linux, CMake 2.8.4) The obvious place would be to put them into the cmake-installation tree, but I'd rather have it in a separate place, such that it is clear what is personal and what came with CMake. So where can I put stuff, such that eg the 'include()' command would find it?<br>
<br>
I can't really find anything about this in the documentation, so I'm sorry if the question is too obvious maybe.... Things I thought of:<br>
* some other places that 'include()' looks - can't find anything about that (besides the module path, but that is obviously not known by 'outside' library-build-systems)<br>
* make the set of .cmake-files into a full package itself, with all the config-files that go with it (but then I'd probably have to do use_package() somehow instead of a simple 'include')<br>
<br>
Hopefully someone has some pointers.<br>
<br>
Yours sincerely,<br>
Jakob van Bethlehem<br>
<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>+1 919 869 8849<br><br>