CMake caches directory of kernel version that was first used for project configuration step. If not using DKMS, and system kernel is updated causing version change, cmake install procedure installs built module to the cached location instead of a new kernel directory.
Currently CMake cache removal is required to auto refresh the kernel location.