FindPythonLibs.cmake: incorrect msys2 search path priority
I have Anaconda (a Python package manager/distribution, which is in the PATH) and msys2 installed on a Windows 10 system.
Using an msys2 shell, FindPythonLibs.cmake
locates Anaconda's python36.lib
instead of choosing the msys2 Python installation located under /mingw(32|64)/lib
.
I could trace the issue to the find_library
which uses registry hints to find Python libraries. Removing the registry hints solves the problem.
CMake version used: 3.9.2