• Tibor Szabo's avatar
    FindCygwin: Fix regression when CYGWIN_INSTALL_PATH is already set · 62930253
    Tibor Szabo authored
    The change in commit v3.9.0-rc1~54^2 (FindCygwin: Use find_program
    instead of find_path, 2017-05-18) broke cases when `CYGWIN_INSTALL_PATH`
    is already set, e.g. on the command-line or by an earlier call to
    `find_package(Cygwin)`.  Since `find_program` now finds the actual
    `cygwin.bat` file, use a separate cache entry to save the location
    and then compute `CYGWIN_INSTALL_PATH`.  If `CYGWIN_INSTALL_PATH`
    is already set, use that to avoid `find_program` having to search.
    62930253
FindCygwin.cmake 632 Bytes