Updated CMake files for better dependency compatibility