CMake has "CMAKE_DEBUG_POSTFIX" option. You can execute CMake like: cmake -G "Visual Studio 9 2008" -DCMAKE_DEBUG_POSTFIX=d ... then the generated project will put out tagd.dll in debug mode.