Thanks!<br><br>
<div class="gmail_quote">On Fri, Oct 14, 2011 at 2:05 PM, John Drescher <span dir="ltr">&lt;<a href="mailto:drescherjm@gmail.com">drescherjm@gmail.com</a>&gt;</span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div class="im">On Fri, Oct 14, 2011 at 7:33 AM, Paul Hansen &lt;<a href="mailto:paul.hansen.name@gmail.com">paul.hansen.name@gmail.com</a>&gt; wrote:<br>&gt; Hi<br>&gt;<br>&gt; Is it possible to make a common CMake setup that can be used in several<br>
&gt; projects?<br>&gt;<br>&gt; The projects are independant but do use common libraries. Would be nice to<br>&gt; set this up in one place and not in the CMakeLists.txt for each project.<br>&gt;<br>&gt; Can it be done &quot;preprocessor-like&quot;:<br>
&gt; #include &quot;/path/to/common/CMakeLists.txt&quot;<br>&gt;<br><br></div>Yes.<br><br>include(/path/to/common/CMakeLists.txt)<br><br>However I would change the name to something like the following:<br>include(/path/to/common/InitilaizeProjects.cmake)<br>

<div class="im"><br>&gt; or is the way to make a top CMakeLists.txt that uses<br>&gt; add_subdirectory(project1)<br>&gt; add_subdirectory(project2)<br>&gt;<br>&gt; or a third way?<br>&gt;<br>&gt; Thank you very much<br>&gt; Paul<br>
&gt;<br></div>&gt; --<br>&gt;<br>&gt; Powered by <a href="http://www.kitware.com/" target="_blank">www.kitware.com</a><br>&gt;<br>&gt; Visit other Kitware open-source projects at<br>&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;<br>&gt; Please keep messages on-topic and check the CMake FAQ at:<br>&gt; <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>&gt;<br>&gt; Follow this link to subscribe/unsubscribe:<br>
&gt; <a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>&gt;<br><font color="#888888"><br><br><br>--<br>John M. Drescher<br></font></blockquote></div><br>