FindCygwin

Finds Cygwin, a POSIX-compatible environment that runs natively on Microsoft Windows.

備註

This module is primarily intended for use in other Find Modules to help locate programs when using the find_*() commands, such as find_program(). In most cases, direct use of those commands is sufficient. Use this module only if a specific program is known to be installed via Cygwin and is usable from Windows.

結果變數

This module defines the following variables:

CYGWIN_INSTALL_PATH

The path to the Cygwin root installation directory.

範例

Finding the Cygwin installation and using its path in a custom find module:

FindFoo.cmake
find_package(Cygwin)
find_program(Foo_EXECUTABLE NAMES foo PATHS ${CYGWIN_INSTALL_PATH}/bin)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Foo REQUIRED_VARS Foo_EXECUTABLE)

另請參見

  • The FindMsys module to find MSYS path in a similar way.