MinGW sh.exe must NOT be in your path June 6, 2023 by Tarik For me, this simple parameter passed to cmake has worked -DCMAKE_SH="CMAKE_SH-NOTFOUND".