[CMake] Difference between PRIVATE and PUBLIC with target_link_libraries

Patrick Boettcher patrick.boettcher at posteo.de
Fri May 13 03:06:29 EDT 2016


On Fri, 13 May 2016 07:06:32 +1000
Craig Scott <craig.scott at crascit.com> wrote:

> Patrick,
> 
> I suggest if you can reduce your problem down to a small, reproducible
> example, then file a bug. I did a test just now with CMake 3.5.2 and
> everything behaved as expected, including the header search path
> propagation, so maybe there's something unusual in your project which
> a simple case doesn't capture. Perhaps also try different generator
> types in case that results in something different (unlikely, but
> since you see different behaviour to me, give it a go).

I filed a bug with a test-case reduced to 7 lines of cmake. I
reproduced it with GNU Make and Ninja a generator.

https://cmake.org/Bug/view.php?id=16102

I'm also reading some cmake-code, but haven't yet found where includes
are inherited from linked targets. Currently looking at 
cmGeneratorTarget::GetIncludeDirectories() ...

Thanks for your feedback.

best regards,
--
Patrick.


More information about the CMake mailing list