CMake should flush cache when CMakeLists.txt is updated
Hi,
I have copied a directory from a linux coomputer to another.
The directory contains some sources and the cmake stuff.
When doing "cmake .", CMake told me that "A required package was not found", but it didn't make sense as this package was installed.
I spent a lot of time tinkering with PREFIX_PATH and LIBRARY_PATH, thinking that the library was installed in an unusual place.
But, you know what... this did the trick.
rm CMakeCache.txt
sudo apt install pkg-config
cmake .
The cache was obsolete (as I did copy it from another computer).
I did tinker with CMakeLists.txt and I suggest that the cache needs to be flushed whenever CMakeLists.txt is more recent.
I really head no clue of the problem and the error message wasn't related to pkg-config at all, which is unintuitive.
Thanks, Simon