[CMake] TARGET_LINK_LIBRARIES debug optimized visual studio 2010

Louis Hoefler louis.hoefler at gmx.de
Fri Jul 29 12:02:58 EDT 2011


Hello everyone.
I try to set a specific library for the debug and release configuration.

I try to do it this way:
IF(DEFINED USEFCGI)
  SET(BACKENDLIB wtfcgi)
ELSE(DEFINED USEFCGI)
  SET(BACKENDLIB wthttp)
ENDIF(DEFINED USEFCGI)

IF(WIN32)
  TARGET_LINK_LIBRARIES(construction.wt
   debug wtd ${BACKENDLIB}d
   optimized wt ${BACKENDLIB})
ELSE(WIN32)
  TARGET_LINK_LIBRARIES(construction.wt wt ${BACKENDLIB})
ENDIF(WIN32)

but the resulting libraries for debug are:
wtd.lib;wthttpd.lib;wthttp.lib
and for release:
wthttpd.lib;wt.lib;wthttp.lib

what am I doing wrong here?

Thank you again, Louis



More information about the CMake mailing list