No subject


Thu Sep 19 15:20:57 EDT 2013


target_link_libraries(target LINK_PRIVATE lib1 LINK_PRIVATE lib2)

however CMake 2.8.11.2 returns:

CMake Error at prime/CMakeLists.txt:128 (target_link_libraries):
  The LINK_PUBLIC or LINK_PRIVATE option must appear as the second argument,
  just after the target name.

What is the correct thing to do here?

Thanks,
James

--001a11c38dc202017204e8e00a6d
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">The documentation for target_link_libraries has this descr=
iption:<div><br></div><div><pre style=3D"color:rgb(0,0,0);font-size:11px;li=
ne-height:22px;text-align:justify">  target_link_libraries(&lt;target&gt;<b=
r>

                        &lt;LINK_PRIVATE|LINK_PUBLIC&gt;<br>               =
           [[debug|optimized|general] &lt;lib&gt;] ...<br>                 =
       [&lt;LINK_PRIVATE|LINK_PUBLIC&gt;<br>                          [[deb=
ug|optimized|general] &lt;lib&gt;] ...])</pre>

</div><div><br></div><div>From my understanding I should be able to do this=
:</div><div><br></div><div>target_link_libraries(target LINK_PRIVATE lib1 L=
INK_PRIVATE lib2)</div><div><br></div><div>however CMake 2.8.11.2 returns:<=
/div>

<div><br></div><div><div>CMake Error at prime/CMakeLists.txt:128 (target_li=
nk_libraries):</div><div>=A0 The LINK_PUBLIC or LINK_PRIVATE option must ap=
pear as the second argument,</div><div>=A0 just after the target name.</div=
>

</div><div><br></div><div>What is the correct thing to do here?</div><div><=
br></div><div>Thanks,</div><div>James</div><div><br></div></div>

--001a11c38dc202017204e8e00a6d--


More information about the cmake-developers mailing list