MantisBT - CMake
View Issue Details
0011058CMakeCMakepublic2010-07-29 02:182011-01-12 07:35
Kovarththanan Rajaratnam 
Brad King 
normalminoralways
closedfixed 
CMake-2-8 
CMake 2.8.4CMake 2.8.4 
0011058: TARGET_LINK_LIBRARIES only works in the directory defining the library
It looks like TARGET_LINK_LIBRARIES(target1 depend1..dependn) only works _if_ TARGET_LINK_LIBRARIES() is invoked in the same directory that defines target1.

The documentation doesn't mention anything about this, so I don't know whether this is a bug?
No tags attached.
Issue History
2010-07-29 02:18Kovarththanan RajaratnamNew Issue
2010-12-15 11:14David ColeAssigned To => Brad King
2010-12-15 11:14David ColeStatusnew => assigned
2010-12-15 12:25Brad KingNote Added: 0024176
2010-12-15 12:25Brad KingStatusassigned => closed
2010-12-15 12:25Brad KingResolutionopen => fixed
2011-01-12 07:35David ColeFixed in Version => CMake 2.8.4
2011-01-12 07:35David ColeTarget Version => CMake 2.8.4

Notes
(0024176)
Brad King   
2010-12-15 12:25   
The behavior is intentional. The local scope needs to know that link information will not magically appear elsewhere. This is so that things like the export() command can write link dependency information immediately.

I updated the documentation and the error message to be more specific:

  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=999ce0aa [^]