<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>&nbsp;&nbsp; &nbsp;IF (WIN32)</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;SET(LIB_RELEASE_NAME &quot;expatdll&quot;)</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;SET(LIB_DEBUG_NAME &quot;expatdll_D&quot;)</div>
<div>&nbsp;&nbsp; &nbsp;ELSE (WIN32)</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;SET(LIB_RELEASE_NAME &quot;expat&quot;)</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;SET(LIB_DEBUG_NAME &quot;expat_D&quot;)</div>
<div>&nbsp;&nbsp; &nbsp;ENDIF(WIN32)</div>
<div>ELSE (BUILD_SHARED_LIBS)</div>
<div>&nbsp;&nbsp; &nbsp;IF (WIN32)</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;SET(LIB_RELEASE_NAME &quot;libexpat&quot;)</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;SET(LIB_DEBUG_NAME &quot;libexpat_D&quot;)</div>
<div>&nbsp;&nbsp; &nbsp;ELSE (WIN32)</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;SET(LIB_RELEASE_NAME &quot;expat&quot;)</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;SET(LIB_DEBUG_NAME &quot;expat_D&quot;)</div>
<div>&nbsp;&nbsp; &nbsp;ENDIF(WIN32)</div>
<div>ENDIF (BUILD_SHARED_LIBS)</div></div></div></div></div></blockquote>
<div>&nbsp;</div>
<div>You can do some thing like this</div>
<div>&nbsp;</div>
<div>SET_TARGET_PROPERTIES (${LIBNAME} PROPERTIES</div>
<div>DEBUG_POSTFIX &quot;_D&quot;</div>
<div>)</div></div>