Imported Upstream version 2.8.10.2
[platform/upstream/cmake.git] / Modules / FindCVS.cmake
1 # The module defines the following variables:
2 #   CVS_EXECUTABLE - path to cvs command line client
3 #   CVS_FOUND - true if the command line client was found
4 # Example usage:
5 #   find_package(CVS)
6 #   if(CVS_FOUND)
7 #     message("CVS found: ${CVS_EXECUTABLE}")
8 #   endif()
9
10 #=============================================================================
11 # Copyright 2008-2009 Kitware, Inc.
12 #
13 # Distributed under the OSI-approved BSD License (the "License");
14 # see accompanying file Copyright.txt for details.
15 #
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.)
22
23 # CVSNT
24
25 get_filename_component(
26   CVSNT_TypeLib_Win32
27   "[HKEY_CLASSES_ROOT\\TypeLib\\{2BDF7A65-0BFE-4B1A-9205-9AB900C7D0DA}\\1.0\\0\\win32]"
28   PATH)
29
30 get_filename_component(
31   CVSNT_Services_EventMessagePath
32   "[HKEY_LOCAL_MACHINE\\SYSTEM\\ControlSet001\\Services\\Eventlog\\Application\\cvsnt;EventMessageFile]"
33   PATH)
34
35 # WinCVS (in case CVSNT was installed in the same directory)
36
37 get_filename_component(
38   WinCVS_Folder_Command
39   "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\Folder\\shell\\wincvs\\command]"
40   PATH)
41
42 # TortoiseCVS (in case CVSNT was installed in the same directory)
43
44 get_filename_component(
45   TortoiseCVS_Folder_Command
46   "[HKEY_CLASSES_ROOT\\CVS\\shell\\open\\command]"
47   PATH)
48
49 get_filename_component(
50   TortoiseCVS_DefaultIcon
51   "[HKEY_CLASSES_ROOT\\CVS\\DefaultIcon]"
52   PATH)
53
54 find_program(CVS_EXECUTABLE cvs
55   ${TortoiseCVS_DefaultIcon}
56   ${TortoiseCVS_Folder_Command}
57   ${WinCVS_Folder_Command}
58   ${CVSNT_Services_EventMessagePath}
59   ${CVSNT_TypeLib_Win32}
60   "[HKEY_LOCAL_MACHINE\\SOFTWARE\\CVS\\Pserver;InstallPath]"
61   DOC "CVS command line client"
62   )
63 mark_as_advanced(CVS_EXECUTABLE)
64
65 # Handle the QUIETLY and REQUIRED arguments and set CVS_FOUND to TRUE if
66 # all listed variables are TRUE
67
68 include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
69 find_package_handle_standard_args(CVS DEFAULT_MSG CVS_EXECUTABLE)