Tag Archives: C++/Qt

[Solved] CMake Error: The current CMakeCache.txt directory is different than xxx

CMake Error: The current CMakeCache.txt directory xxx/CMakeCache.txt
is different than the directory
xxx where CMakeCache.txt was created. This may result in binaries being
created in the wrong place. If you are not sure, reedit the
CMakeCache.txt CMake Error: The source
“xxx/CMakeLists.txt”
does not match the source
“xxx/CMakeLists.txt”
used to generate cache. Re-run cmake with a different source
directory.


You copied the project file, but the cache file in the build still retains the previous information. Just delete the build folder and recompile.