cmake: Add VERSION_VAR in find package module
Fixes build with latest CMake master due to changes in find_package_handle_standard_args
. The package is marked as not found because a version was requested in find_package
, but VERSION_VAR
was not set. FATAL_ON_MISSING_REQUIRED_PACKAGES
then aborts the build.
Upstream discussion https://gitlab.kitware.com/cmake/cmake/-/merge_requests/7527#note_1245246