update CMake file to support other directories