[CMake] Linking directories on a "sub" CMakeLists

Brad King brad.king at kitware.com
Tue Aug 22 11:09:40 EDT 2006


Xavier Larrode wrote:
> Hi Brad and thanks, it seems better.
> But now i have this error :
> Error: Attempt to add link library "RelationPosition" to target
> "PieMenu" which is not built by this project.
> 
> What's wrong with that ?
> should i add the library differently ?

Use FIND_LIBRARY to locate the library and obtain a full path to it.
Then reference it from TARGET_LINK_LIBRARIES.  Then you don't even need
a LINK_DIRECTORIES command at all.

-Brad


More information about the CMake mailing list