refactored CMake files to work with previous instructions