MantisBT - CMake
View Issue Details
0013247CMakeCMakepublic2012-05-25 06:452012-10-01 13:23
4ertus2 
 
normalminoralways
closedno change required 
WindowsWindows 76.1
CMake 2.8.7 
 
0013247: VC generator add all shared library deps for dependent targets
I use lots of static libraries targets that are combined into resulting shared library (in example mylib.dll). After that I add executable that depends on resulting library only (ex. myprog.exe).

VC Generator add all the mylib.dll dependencies to myprog.exe link flags. It is strange behavior cause if some function is already in mylib.dll I don't need any dependencies and if it's not - I better define some library in target_link_libraries manually. In fact it could be a problem - not all functions are included in mylib.dll. And CMake try to hide the problem from me.
No tags attached.
Issue History
2012-05-25 06:454ertus2New Issue
2012-05-25 08:03Brad KingNote Added: 0029565
2012-05-25 08:03Brad KingStatusnew => resolved
2012-05-25 08:03Brad KingResolutionopen => no change required
2012-10-01 13:23David ColeNote Added: 0031135
2012-10-01 13:23David ColeStatusresolved => closed

Notes
(0029565)
Brad King   
2012-05-25 08:03   
See this FAQ entry:

http://www.cmake.org/Wiki/CMake_FAQ#Why_are_libraries_linked_to_my_shared_library_included_when_something_links_to_it.3F [^]
(0031135)
David Cole   
2012-10-01 13:23   
Closing resolved issues that have not been updated in more than 4 months.