On MinGW and MSYS2, the MLang APIs are already provided by the Windows runtime, so manually checking for Mlang.h and linking mlang via dlopen is unnecessary and currently fails. The existing CMake logic under IF(WIN32) tries to detect and link mlang, but in MinGW/MSYS2 this check does not work and causes configuration errors. We need to detect the MinGW/MSYS2 environment and skip those MLang checks.
Refer: https://packages.msys2.org/packages/mingw-w64-x86_64-headers-git