<div class="gmail_quote">On Sun, Feb 15, 2009 at 4:05 PM, Wade Williams <span dir="ltr"><<a href="mailto:wadesworld@mac.com">wadesworld@mac.com</a>></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;">
I have a project that looks like:<br>
<br>
project_root/lib/util<br>
<br>
In util is the CMakeLists.txt file that contains all the necessary commands to build the util lib.<br>
<br>
In the lib dir is a CMakeLists.txt file that simply has add_subdirectory(util).<br>
<br>
In the project_root dir is a CMakeLists.txt file that simply has add_subdirectory(lib).<br>
<br>
If I enter the util directory and issue:<br>
<br>
cmake .<br>
make<br>
<br>
then the library builds fine.<br>
<br>
If I enter lib and do the same, the library builds fine.<br>
<br>
but if I enter the project root and do the same, I get errors about a header not being found. I'm confused as to how that can be the case if the two dependent directories built fine?<br>
<br>
Any thoughts as to why this might be happening?</blockquote><div><br>You might not be building what you think you're building in the project root. You could try make "VERBOSE=1" to see the compilation flags that are being used and compare what happens when you invoke make in the two directories.<br>
</div></div><br>-- <br>Philip Lowman<br>