A small example (and verified on a clean SUSE installation):<br><br>====================<br>PROJECT(test)<br><br>cmake_policy(SET CMP0003 NEW)<br><br>ADD_EXECUTABLE(<br> test<br> main.cpp<br>)<br>TARGET_LINK_LIBRARIES(<br>
test<br> /usr/lib/libpthread.a<br> /usr/lib/librt.a<br> /usr/lib/libc.a<br>)<br>====================<br><br>==> this won't set the .a's in the commandline as it should do, but rather link it via -Wl,-Bstatic...<br>
<br><br>And I really need those static links, because no single other library on the system exports the required symbols, not even the shared ones.<br><br><br>Greetings<br><br><div class="gmail_quote">2008/6/15 Steven Van Ingelgem <<a href="mailto:steven@vaningelgem.be">steven@vaningelgem.be</a>>:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi,<br><br><br>I have a question about CMP0003...<br>When I give the full path to a static library, it's supposed to link against that one... But right now I'm linking against:<br>
"/usr/lib/libpthread.a" (message before the target_link_libraries call)<br>
This results however in "-Wl,-Bstatic -lpthread"... Which doesn't seem like the correct behaviour?<br><br>What could be the reason for this?<br><br><br><br>Thanks,<br><font color="#888888">Steven<br>
</font></blockquote></div><br>