Hi all,<div><br></div><div>I&#39;m attempting to use the ExternalProject module to compile and link against a library and I&#39;ve run into a problem that I&#39;m not certain how to address. I&#39;m using CMake 2.8.6 and Visual Studio 10 Express.</div>
<div><br></div><div>The external project, in my case, is a CMake-compiled project and CMake predictably builds a matching configuration in the external project.</div><div><br></div><div>The target_link_libraries() command, however, only allows for two configurations, at most, mapped to labels &quot;debug&quot; and &quot;optimized.&quot;</div>
<div><br></div><div>This allows for only two of the four default build configurations to complete successfully.</div><div><br></div><div>For example, in my build scripts, I have told target_link_libraries() to map &quot;debug&quot; configurations to the Debug version of library and optimized configurations map to the &quot;RelWithDebInfo&quot; build of the library. Therefore, if I build the &quot;Release&quot; configuration, I get linker errors because the external project was also built with the &quot;Release&quot; configuration but I need to link against &quot;RelWithDebInfo.&quot;</div>
<div><br></div><div>It seems to be that no matter how the target_link_library() mappings are set up, only half of the default configurations will build properly because of the dualism that target_link_libraries() uses.</div>
<div><br></div><div>How do I get all four default build configurations working?</div><div><br></div><div>Regards,</div><div>Mike</div>