Use CMake PROJECT_VERSION
Use VERSION
parameter of project()
function and corresponding PROJECT_VERSION
variables.
Further moves variables for configured files after find_package()
calls as a workaround for a bug in FindPython.cmake
(see CMake issue https://gitlab.kitware.com/cmake/cmake/-/issues/21817) introduced in CMake 3.19 and fixed in CMake 3.20.