diff options
author | Brad King <brad.king@kitware.com> | 2017-08-15 18:00:59 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-08-15 18:00:59 (GMT) |
commit | 752ab27292b0ed801c1850eebb96b2d9651b839d (patch) | |
tree | a1ff2454d5958636e5b3aee6ea078c8a4ba8aa41 | |
parent | 1622848efced798022ac320aaa3e49a3433e0024 (diff) | |
parent | 62930253a3d3eb983f846a3cf20f36e34c71cb9e (diff) | |
download | CMake-752ab27292b0ed801c1850eebb96b2d9651b839d.zip CMake-752ab27292b0ed801c1850eebb96b2d9651b839d.tar.gz CMake-752ab27292b0ed801c1850eebb96b2d9651b839d.tar.bz2 |
Merge branch 'backport-FindCygwin-fix-regression' into release-3.9
Merge-request: !1128
-rw-r--r-- | Modules/FindCygwin.cmake | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/Modules/FindCygwin.cmake b/Modules/FindCygwin.cmake index b2ed703..c6913da 100644 --- a/Modules/FindCygwin.cmake +++ b/Modules/FindCygwin.cmake @@ -8,14 +8,17 @@ # this module looks for Cygwin if (WIN32) - find_program(CYGWIN_INSTALL_PATH + if(CYGWIN_INSTALL_PATH) + set(CYGWIN_BAT "${CYGWIN_INSTALL_PATH}/cygwin.bat") + endif() + + find_program(CYGWIN_BAT 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 - ) + get_filename_component(CYGWIN_INSTALL_PATH "${CYGWIN_BAT}" DIRECTORY) + mark_as_advanced(CYGWIN_BAT) + endif () |