The problem is that CMAKE_IGNORE_PREFIX_PATH doesn’t have a way of deducing the prefix from $ENV{PATH}. Sure, if the component ends in /bin then there’s a chance that the preceding component might be the prefix, but do we want to bet on that?
How is it finding the libraries? Is there an equivalent of PATH that it’s using for that?