FWD to developers list. I think this is a documentation issue.<br><br><div class="gmail_quote">Luis Felipe Dominguez Vega <<a href="mailto:lfdominguez@estudiantes.uci.cu">lfdominguez@estudiantes.uci.cu</a>> schrieb am Mon Nov 17 2014 at 5:42:55 PM:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I can't see into the source code of cmake, into the<br>
cmTargetIncludeDirectoriesComm<u></u>and.cxx somethink like import the<br>
INCLUDE_DIRECTORIES from target passed to target_include_directories, may an<br>
error in the documentation?<br>
------------------------------<u></u>-----------------------------<br>
On Sunday 16 November 2014 11:56:05 AM Wojciech Mamrak wrote:<br>
> Hello,<br>
><br>
> the docs claim:<br>
><br>
> "Specify include directories or targets to use when compiling a given<br>
> target."<br>
><br>
> Here is a little test of it. Project directory:<br>
><br>
> Foo<br>
>   CMakeLists.txt<br>
>   FooSrc<br>
>     a.h<br>
>     a.cpp<br>
>   Bar<br>
>     main.cpp<br>
><br>
> And CMakeLists.txt:<br>
><br>
> cmake_minimum_required(VERSION 3.0)<br>
><br>
> project(FooBar)<br>
><br>
> add_library(Foo FooSrc/a.h FooSrc/a.cpp)<br>
><br>
> target_include_directories(Foo PUBLIC G:/some_directory)<br>
><br>
> if (TARGET Foo)<br>
>     message("Foo is a target!")<br>
> endif()<br>
><br>
> add_executable(Bar Bar/main.cpp)<br>
><br>
> target_include_directories(Bar PRIVATE Foo)<br>
><br>
> According to the docs, Bar's include directories should contain at<br>
> least "G:/some_directory", but it contains<br>
> "${PROJECT_SOURCE_DIR}/Foo". Why?<br>
><br>
> If I replace the last line with target_link_libraries(Bar PRIVATE<br>
> Foo), then Bar's include directories meet my expectations.<br>
><br>
> regards<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>
</blockquote></div>