CMake: Fix a few CMake autogen warnings
(cherry picked from commit 49c6e9102a7294d431fe64b71871209b55989e3b)