<div class="gmail_quote">On Fri, Oct 14, 2011 at 11:22 AM, Hendrik Sattler <span dir="ltr"><<a href="mailto:post@hendrik-sattler.de">post@hendrik-sattler.de</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Yes. Compilation of a project should always be possible without polluting the system.<br>
<br>
For other programs or libraries in the same source tree, install() is not the right thing.<br>
You have several options:<br>
a)<br>
Copy the headers in the right structure to the build tree and use as include directory. This also makes your install() command easier: you just have to copy the directory as-is. However, you have to setup dependencies correctly so that changed header files (and only those) get copied again if they changed. If you build in-tree (source dir == build dir, which is not recommended), such a scheme may have problems.<br>
<br>
b)<br>
Is there _any_ reason to no arrange the headers in the source tree in a way that makes it usuable for direct inclusion?</blockquote><div><br></div><div>I'm converting this very large code base to use CMake, it currently uses Cygwin and makefiles. I can't rearrange anything yet until the whole company merges over to CMake, since the Makefile build system depends on the current hierarchy. For now CMake has to just work around issues like these by making copies as you say and using the temp copies as the source directory. </div>
</div>