[CMake] add_dependencies has a wrong order?

Michael Wild themiwi at gmail.com
Wed Feb 25 08:56:04 EST 2009


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}.

HTH

Michael

On 25. Feb, 2009, at 14:15, Steven Van Ingelgem wrote:

> I have:
> add_dependencies(dlib_httpclient dlib)
>
> But in my cmakelists I have:
> TARGET_LINK_LIBRARIES(${PROJECT_NAME} dlib dlib_httpclient)
>
> Conclusion: it will change itself to "bin/libdlib.a
> bin/libdlib_httpclient.a"
> instead I would expect "bin/libdlib_httpclient.a bin/libdlib.a" as I  
> told it
> to add the dependency.
>
>
> Greetings,
> Steven
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake



More information about the CMake mailing list