diff options
Diffstat (limited to 'Modules/FindCygwin.cmake')
-rw-r--r-- | Modules/FindCygwin.cmake | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/Modules/FindCygwin.cmake b/Modules/FindCygwin.cmake index b2ed703..092a3bd 100644 --- a/Modules/FindCygwin.cmake +++ b/Modules/FindCygwin.cmake @@ -8,14 +8,19 @@ # this module looks for Cygwin if (WIN32) - find_program(CYGWIN_INSTALL_PATH - cygwin.bat - "C:/Cygwin" - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Cygwin\\setup;rootdir]" - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Cygnus Solutions\\Cygwin\\mounts v2\\/;native]" - ) - get_filename_component(CYGWIN_INSTALL_PATH "${CYGWIN_INSTALL_PATH}" DIRECTORY) - mark_as_advanced( - CYGWIN_INSTALL_PATH + if(CYGWIN_INSTALL_PATH) + set(CYGWIN_BAT "${CYGWIN_INSTALL_PATH}/cygwin.bat") + endif() + + find_program(CYGWIN_BAT + NAMES cygwin.bat + PATHS + "C:/Cygwin" + "C:/Cygwin64" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Cygwin\\setup;rootdir]" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Cygnus Solutions\\Cygwin\\mounts v2\\/;native]" ) + get_filename_component(CYGWIN_INSTALL_PATH "${CYGWIN_BAT}" DIRECTORY) + mark_as_advanced(CYGWIN_BAT) + endif () |