Update CMake scripts to support debug libs