[cmake-developers] Setting the link interface and dependencies in one command

Brad King brad.king at kitware.com
Mon Oct 10 09:34:17 EDT 2011


On 10/9/2011 11:35 AM, Alexander Neundorf wrote:
> But doesn't this still have the same problem ?
>
> I mean, if "LINK_PUBLIC" is at the end of a ${FOO_LIBS} variable, everything
> put after it will be PUBLIC:
> target_link_libraries(Foo LINK_PRIVATE lib1 lib2 ${FOO_LIBS} lib3)
>
> with FOO_LIBS being e.g. "LINK_PRIVATE libA LINK_PUBLIC libB".
> Or isn't that what you meant ?

Stephen asked the same question and I answered it on 2011-10-07 8:36am EDT:

   http://www.cmake.org/pipermail/cmake-developers/2011-October/002267.html

The answer is yes, but it is less likely to happen unintentionally.

-Brad



More information about the cmake-developers mailing list