FindCVS.cmake 2.2 KB

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