_VERSION_MAJOR

From Get docs
Cmake/docs/3.21/variable/project-name version major


_VERSION_MAJOR

First version number component of the _VERSION variable as set by the project() command.

© 2000–2021 Kitware, Inc. and Contributors
Licensed under the BSD 3-clause License.
https://cmake.org/cmake/help/v3.21/variable/PROJECT-NAME_VERSION_MAJOR.html