Yes, it has to do something with it...<br>Because at least when linking under Linux, if I added dlib BEFORE dlib_httpclient (as is now the case), dlib_httpclient will complain about undefined symbols.<br><br>That's where the add_dependencies would come into play in my honest opinion. CMake should calculate the order in which to place the libraries to link with to honour all the calls made in the project. So in my case, place dlib behind dlib_httpclient.<br>
<br>What you are refering to is not a dependency in linkage, but a dependency in compilation. This is fine of course, but is not enough when compiling libraries.<br><br><br>Greetings,<br>Steven<br><br><br><div class="gmail_quote">
2009/2/25 Michael Wild <span dir="ltr"><<a href="mailto:themiwi@gmail.com">themiwi@gmail.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I think you misunderstand add_dependencies. The command adds a dependency of dlib_httpclient on dlib, i.e. dlib_httplclient DEPENDS ON dlib. It has nothing to do with the order the libraries appear on the command line when you link ${PROJECT_NAME}.<br>
<br>
HTH<br>
<br>
Michael<div><div></div><div class="h5"><br>
<br>
On 25. Feb, 2009, at 14:15, Steven Van Ingelgem wrote:<br>
<br>
</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5">
I have:<br>
add_dependencies(dlib_httpclient dlib)<br>
<br>
But in my cmakelists I have:<br>
TARGET_LINK_LIBRARIES(${PROJECT_NAME} dlib dlib_httpclient)<br>
<br>
Conclusion: it will change itself to "bin/libdlib.a<br>
bin/libdlib_httpclient.a"<br>
instead I would expect "bin/libdlib_httpclient.a bin/libdlib.a" as I told it<br>
to add the dependency.<br>
<br>
<br>
Greetings,<br>
Steven<br></div></div>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</blockquote>
<br>
</blockquote></div><br>