Updated CMakeLists.txt to improve support for building Debug and Release versions