<div class="gmail_quote">
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div style="WORD-WRAP: break-word">
<div>
<div>I use the following code for MSVC2003.Net. Not sure if it works on VS2005 or VS2008:
<div><br></div>
<div>
<div>IF (BUILD_SHARED_LIBS)</div>
<div> IF (WIN32)</div>
<div> SET(LIB_RELEASE_NAME "expatdll")</div>
<div> SET(LIB_DEBUG_NAME "expatdll_D")</div>
<div> ELSE (WIN32)</div>
<div> SET(LIB_RELEASE_NAME "expat")</div>
<div> SET(LIB_DEBUG_NAME "expat_D")</div>
<div> ENDIF(WIN32)</div>
<div>ELSE (BUILD_SHARED_LIBS)</div>
<div> IF (WIN32)</div>
<div> SET(LIB_RELEASE_NAME "libexpat")</div>
<div> SET(LIB_DEBUG_NAME "libexpat_D")</div>
<div> ELSE (WIN32)</div>
<div> SET(LIB_RELEASE_NAME "expat")</div>
<div> SET(LIB_DEBUG_NAME "expat_D")</div>
<div> ENDIF(WIN32)</div>
<div>ENDIF (BUILD_SHARED_LIBS)</div></div></div></div></div></blockquote>
<div> </div>
<div>You can do some thing like this</div>
<div> </div>
<div>SET_TARGET_PROPERTIES (${LIBNAME} PROPERTIES</div>
<div>DEBUG_POSTFIX "_D"</div>
<div>)</div></div>