FindCVS.cmake 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. #.rst:
  2. # FindCVS
  3. # -------
  4. #
  5. #
  6. #
  7. # The module defines the following variables:
  8. #
  9. # ::
  10. #
  11. # CVS_EXECUTABLE - path to cvs command line client
  12. # CVS_FOUND - true if the command line client was found
  13. #
  14. # Example usage:
  15. #
  16. # ::
  17. #
  18. # find_package(CVS)
  19. # if(CVS_FOUND)
  20. # message("CVS found: ${CVS_EXECUTABLE}")
  21. # endif()
  22. #=============================================================================
  23. # Copyright 2008-2009 Kitware, Inc.
  24. #
  25. # Distributed under the OSI-approved BSD License (the "License");
  26. # see accompanying file Copyright.txt for details.
  27. #
  28. # This software is distributed WITHOUT ANY WARRANTY; without even the
  29. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  30. # See the License for more information.
  31. #=============================================================================
  32. # (To distribute this file outside of CMake, substitute the full
  33. # License text for the above reference.)
  34. # CVSNT
  35. get_filename_component(
  36. CVSNT_TypeLib_Win32
  37. "[HKEY_CLASSES_ROOT\\TypeLib\\{2BDF7A65-0BFE-4B1A-9205-9AB900C7D0DA}\\1.0\\0\\win32]"
  38. PATH)
  39. get_filename_component(
  40. CVSNT_Services_EventMessagePath
  41. "[HKEY_LOCAL_MACHINE\\SYSTEM\\ControlSet001\\Services\\Eventlog\\Application\\cvsnt;EventMessageFile]"
  42. PATH)
  43. # WinCVS (in case CVSNT was installed in the same directory)
  44. get_filename_component(
  45. WinCVS_Folder_Command
  46. "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\Folder\\shell\\wincvs\\command]"
  47. PATH)
  48. # TortoiseCVS (in case CVSNT was installed in the same directory)
  49. get_filename_component(
  50. TortoiseCVS_Folder_Command
  51. "[HKEY_CLASSES_ROOT\\CVS\\shell\\open\\command]"
  52. PATH)
  53. get_filename_component(
  54. TortoiseCVS_DefaultIcon
  55. "[HKEY_CLASSES_ROOT\\CVS\\DefaultIcon]"
  56. PATH)
  57. find_program(CVS_EXECUTABLE cvs
  58. ${TortoiseCVS_DefaultIcon}
  59. ${TortoiseCVS_Folder_Command}
  60. ${WinCVS_Folder_Command}
  61. ${CVSNT_Services_EventMessagePath}
  62. ${CVSNT_TypeLib_Win32}
  63. "[HKEY_LOCAL_MACHINE\\SOFTWARE\\CVS\\Pserver;InstallPath]"
  64. DOC "CVS command line client"
  65. )
  66. mark_as_advanced(CVS_EXECUTABLE)
  67. # Handle the QUIETLY and REQUIRED arguments and set CVS_FOUND to TRUE if
  68. # all listed variables are TRUE
  69. include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
  70. find_package_handle_standard_args(CVS DEFAULT_MSG CVS_EXECUTABLE)