I guess the key is static libraries don't exactly adhere to the rules of PUBLIC or PRIVATE, so you end up with a library that CMake passes along with a populated INTERFACE_INCLUDE_DIRECTORIES, and so exe1 uses it because it is there? Not sure how it is supposed to work at this point.
On Thu, May 12, 2016 at 9:26 AM, Patrick Boettcher <patrick.boettc...@posteo.de> wrote: > On Thu, 12 May 2016 09:20:10 -0500 > iosif neitzke <iosif.neitzke+cm...@gmail.com> wrote: > >> I'm sorry, I'm not sure I understand. In your example, there is >> target_link_libraries(lib3 PUBLIC lib1). It looks like lib2 has >> target_link_libraries(lib2 PRIVATE lib1). > > Yes. That is correct. > > When building the code for lib2 and lib3 the include-path of lib1 is > provided (as expected). > > Then when building exe1 (links to lib2) and exe2 (links to lib3) the > lib1's include-path is present in both cases. > > Whereas it should not be present with exe1, at least that is my > understanding. > > -- > Patrick. -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake