updated CMakeLists.txt to be a bit more general