MantisBT - CMake
View Issue Details
0013861CMakeCMakepublic2013-01-20 09:292016-06-10 14:31
criskross 
Kitware Robot 
highminoralways
closedmoved 
WindowsWindows 7x64
CMake 2.8.10.2 
 
0013861: SET(LIBRARIES debug ${LIBRARY_DBG} optimized ${LIBRARY} ) doesn't work for Visual Studio 2010
Hello,

When I try to link libraries for debug and release different for visual studio 2010 the in debug/release project properties both library types are linked against each one. So if I look at properties of debug there are also the release libraries are linked. For release properties it's the same. Release are linked againse debug and release of a library.

TARGET_LINK_LIBRARIES(projectname ${LIBRARIES } )

This doesn't work.
Find(somepackage)

in Findsomepackage.cmake look for both debug and release libraries and define own variables for both.

then:

SET(LIBRARIES debug ${LIBRARY_DBG} optimized ${LIBRARY} )
TARGET_LINK_LIBRARIES(projectname ${LIBRARIES } )

All of this for Visual Studio
No tags attached.
Issue History
2013-01-20 09:29criskrossNew Issue
2013-01-23 10:38Brad KingNote Added: 0032128
2016-06-10 14:28Kitware RobotNote Added: 0042204
2016-06-10 14:28Kitware RobotStatusnew => resolved
2016-06-10 14:28Kitware RobotResolutionopen => moved
2016-06-10 14:28Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0032128)
Brad King   
2013-01-23 10:38   
AFAIK this is known to work and well-tested. Please provide a minimal complete example CMake project that reproduces it.
(0042204)
Kitware Robot   
2016-06-10 14:28   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.