On 09/21/2007 10:15 PM,  Juan Sanchez wrote:
Hello,

How do you add an externally library for linking into a target?  I am
getting something like this from TARGET_LINK_LIBRARIES?

CMake Error: Attempt to add link library "/bar/linux-x86/opt/foo.a" to
target "waterlooApps" which is not built by this project.

Thanks,

Juan


This happens if you mix the executable names. If your subproject is say prototype1 the following will return the above error:

ADD_EXECUTABLE( prototype1 prototype1.cpp )

TARGET_LINK_LIBRARIES( prototype3 libfoo )


You have to write

ADD_EXECUTABLE( prototype1 prototype1.cpp )

TARGET_LINK_LIBRARIES( prototype1 libfoo )
_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to