find_package: upper-case <PACKAGENAME>_ROOT variables
find_package
searches prefixes specified by <PackageName>_ROOT
environment and CMake variables since policy CMP0074 was introduced by CMake 3.12 via !1858 (merged).
The spelling of the <PackageName>_ROOT
name preserves the exact case specified as the first argument to find_package
. Discussion in #24378 (comment 1315661) suggests that we should also check the upper-case name <PACKAGENAME>_ROOT
because upper-case environment variable names are a common convention.
Adding this will need a policy for compatibility. Some care will also be needed to deal with platforms that have case-insensitive environment variable lookup.