Joachim de Vries wrote:
CMake version 2.7-20080708
Mac OSX 10.5
XCode 3.0
I have a problem with add_dependencies.
If I add an imported static lib like this:
add_library("mylib" STATIC IMPORTED)
and try to add a dependency to this target on another target like this:
add_dependencies(myapp "mylib")
I get the following error:
CMake Error: Unknown Target referenced : mylib
CMake Error: Target: myapp depends on unknown target: mylib
Is it not possible to add imported targets to dependency list?
The add_dependencies command controls the order in which targets in the project
build. There is no need to enforce that myapp builds after mylib because mylib
is imported and therefore is already built.
If you want to *link* to mylib, use
target_link_libraries(myapp mylib)
-Brad
_______________________________________________
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