1 # The module defines the following variables:
2 # GIT_EXECUTABLE - path to git command line client
3 # GIT_FOUND - true if the command line client was found
7 # message("git found: ${GIT_EXECUTABLE}")
10 #=============================================================================
11 # Copyright 2010 Kitware, Inc.
13 # Distributed under the OSI-approved BSD License (the "License");
14 # see accompanying file Copyright.txt for details.
16 # This software is distributed WITHOUT ANY WARRANTY; without even the
17 # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 # See the License for more information.
19 #=============================================================================
20 # (To distribute this file outside of CMake, substitute the full
21 # License text for the above reference.)
23 # Look for 'git' or 'eg' (easy git)
27 # Prefer .cmd variants on Windows unless running in a Makefile
31 if(NOT CMAKE_GENERATOR MATCHES "MSYS")
32 set(git_names git.cmd git eg.cmd eg)
36 find_program(GIT_EXECUTABLE
38 DOC "git command line client"
40 mark_as_advanced(GIT_EXECUTABLE)
42 # Handle the QUIETLY and REQUIRED arguments and set GIT_FOUND to TRUE if
43 # all listed variables are TRUE
45 include(FindPackageHandleStandardArgs)
46 find_package_handle_standard_args(Git DEFAULT_MSG GIT_EXECUTABLE)