title: In CMake, how do I work around the Debug and Release directories Visual Studio 2010 tries to add?
body: <p>I'm trying to build one of my CMake-based projects from a couple of years ago with Visual Studio 2010 and I'm running into problems to do with the output directory for a project. Visual Studio has always been very keen on adding Debug/ and Release/ subdirectories when outputting binaries, and for various reasons I've always been very keen on removing them - now that I'm using a new version of CMake and a new version of Visual Studio, the old workaround in CMake no longer seems to work, and I'm looking to find out the "new" way of doing it.</p>
  
  <p>With a previous version of CMake (2.6) and a previous version of Visual Studio (2008), I used the following:</p>
  
  <pre><code>IF(MSVC_IDE)
      # A hack to get around the "Debug" and "Release" directories Visual Studio tries to add
      SET_TARGET_PROPERTIES(${targetname} PROPERTIES PREFIX "../")
      SET_TARGET_PROPERTIES(${targetname} PROPERTIES IMPORT_PREFIX "../")
  ENDIF(MSVC_IDE)
  </code></pre>
  
  <p>This worked fine, but no longer seems to do the trick. Please does anyone know of a similar but more up-to-date workaround that will work with CMake 2.8.6 and Visual Studio 2010?</p>