<div dir="ltr"><div>Hi Bill,</div><div><br></div>He wrote<div><br></div><div>"<span style="font-family:'courier new',monospace;font-size:13px">Note also that prog.cpp includes this header via #include "myfunc.h"." </span></div><div><span style="font-family:'courier new',monospace;font-size:13px"><br></span></div><div>in his first email, so I thought he wants to include it directly.</div><div><br></div><div>Cheers!</div><div>Angeliki</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 2, 2014 at 8:09 PM, Bill Hoffman <span dir="ltr"><<a href="mailto:bill.hoffman@kitware.com" target="_blank">bill.hoffman@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 12/2/2014 1:33 PM, Angeliki Chrysochou wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
you should add in ./src/prog/CMakeLists.txt in include_directories the<br>
correct path to myfunc.h. Assuming CMAKE_SOURCE_DIR is "." (this is<br>
where your top level CMakeLists.txt is located):<br>
<br>
include_directories(${CMAKE_<u></u>SOURCE_DIR}/src/mylib)<br>
</blockquote></span>
I don't think that will work.  Two reasons:<br>
<br>
CMAKE_SOURCE_DIR is the top level source directory for the project, not the current one.  Also, he wants to include the file like this:<br>
<br>
#include "mylib/myfunc.h"<br>
<br>
So, the include needs to go to src  and not src/mylib.<span class="HOEnZb"><font color="#888888"><br>
<br>
-Bill</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
-- <br>
<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</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/<u></u>CMake_FAQ</a><br>
<br>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" target="_blank">http://cmake.org/cmake/help/<u></u>support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" target="_blank">http://cmake.org/cmake/help/<u></u>consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" target="_blank">http://cmake.org/cmake/help/<u></u>training.html</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/<u></u>opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/cmake" target="_blank">http://public.kitware.com/<u></u>mailman/listinfo/cmake</a><br>
</div></div></blockquote></div><br></div>