Its sufficient to simply specify a debug postfix instead of using an separate variable. What's nice about this approach is that it will actually work :p Previously the code wouldn't work for multi-configuration generators like Visual Studio.