CMakeMinGWFindMake.cmake 800 B

12345678910111213141516
  1. # Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. # file Copyright.txt or https://cmake.org/licensing for details.
  3. find_program(CMAKE_MAKE_PROGRAM mingw32-make.exe PATHS
  4. "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\MinGW;InstallLocation]/bin"
  5. c:/MinGW/bin /MinGW/bin
  6. "[HKEY_CURRENT_USER\\Software\\CodeBlocks;Path]/MinGW/bin"
  7. )
  8. find_program(CMAKE_SH sh.exe )
  9. if(CMAKE_SH)
  10. message(FATAL_ERROR "sh.exe was found in your PATH, here:\n${CMAKE_SH}\nFor MinGW make to work correctly sh.exe must NOT be in your path.\nRun cmake from a shell that does not have sh.exe in your PATH.\nIf you want to use a UNIX shell, then use MSYS Makefiles.\n")
  11. set(CMAKE_MAKE_PROGRAM NOTFOUND)
  12. endif()
  13. mark_as_advanced(CMAKE_MAKE_PROGRAM CMAKE_SH)