Here is how I got around what you describe. My project sounds pretty similar in how it is set up<br><br>when building the exe:<br>IF (PLATFORM MATCHES &quot;win32&quot;)&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; IF (CMAKE_GENERATOR MATCHES &quot;Visual Studio 8 2005&quot;)
<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; SET_TARGET_PROPERTIES (${project_exe} PROPERTIES<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; LINK_FLAGS &quot;$(TargetDir)/project_shared.lib&quot;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; )<br>&nbsp;&nbsp;&nbsp; ELSE (CMAKE_GENERATOR MATCHES &quot;Visual Studio 8 2005&quot;) #nmake makefiles
<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; SET_TARGET_PROPERTIES (${project_exe} PROPERTIES<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; LINK_FLAGS &quot;${LIBRARY_OUTPUT_PATH}/project_shared.lib&quot;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; )<br>&nbsp;&nbsp;&nbsp; ENDIF (CMAKE_GENERATOR MATCHES &quot;Visual Studio 8 2005&quot;)
<br>ELSE (PLATFORM MATCHES &quot;win32&quot;)<br>&nbsp;&nbsp;&nbsp; SET_TARGET_PROPERTIES (${project_exe} PROPERTIES<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; LINK_FLAGS &quot;-L${LIBRARY_OUTPUT_PATH} -lproject_shared&quot;<br>&nbsp;&nbsp;&nbsp; )<br>ENDIF (PLATFORM MATCHES &quot;win32&quot;)
<br><br>building shared library:<br>IF (PLATFORM MATCHES &quot;win32&quot;)<br>&nbsp;&nbsp;&nbsp; # nothing<br>ELSE (PLATFORM MATCHES &quot;win32&quot;)<br>&nbsp;&nbsp;&nbsp; SET_TARGET_PROPERTIES (${project_SHARED} PROPERTIES<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; PREFIX &quot;lib&quot;
<br>&nbsp;&nbsp;&nbsp; )<br>ENDIF (PLATFORM MATCHES &quot;win32&quot;)<br><br>building a plugin:<br>IF (PLATFORM MATCHES &quot;win32&quot;)<br>&nbsp;&nbsp;&nbsp; IF (CMAKE_GENERATOR MATCHES &quot;Visual Studio 8 2005&quot;)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; SET_TARGET_PROPERTIES (${PLUGIN_NAME} PROPERTIES
<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; LINK_FLAGS &quot;$(TargetDir)/project_shared.lib&quot;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; )<br>&nbsp;&nbsp;&nbsp; ELSE (CMAKE_GENERATOR MATCHES &quot;Visual Studio 8 2005&quot;) #nmake<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; SET_TARGET_PROPERTIES (${PLUGIN_NAME} PROPERTIES
<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; LINK_FLAGS &quot;${LIBRARY_OUTPUT_PATH}/project_shared.lib&quot;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; )<br>&nbsp;&nbsp;&nbsp; ENDIF (CMAKE_GENERATOR MATCHES &quot;Visual Studio 8 2005&quot;)<br>ELSE (PLATFORM MATCHES &quot;win32&quot;)<br>&nbsp;&nbsp;&nbsp; SET_TARGET_PROPERTIES (${PLUGIN_NAME} PROPERTIES
<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; LINK_FLAGS &quot;-L${LIBRARY_OUTPUT_PATH} -lproject_shared&quot;<br>&nbsp;&nbsp;&nbsp; )<br>ENDIF (PLATFORM MATCHES &quot;win32&quot;)<br><br>exe depends on shared library<br>plugins depend on shared library<br><br>the plugins in my case, are the ones that depend on the third party libraries
<br>