FindCVS.cmake 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. # Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. # file Copyright.txt or https://cmake.org/licensing for details.
  3. #[=======================================================================[.rst:
  4. FindCVS
  5. -------
  6. Find the Concurrent Versions System (CVS).
  7. The module defines the following variables:
  8. ::
  9. CVS_EXECUTABLE - path to cvs command line client
  10. CVS_FOUND - true if the command line client was found
  11. Example usage:
  12. ::
  13. find_package(CVS)
  14. if(CVS_FOUND)
  15. message("CVS found: ${CVS_EXECUTABLE}")
  16. endif()
  17. #]=======================================================================]
  18. # CVSNT
  19. get_filename_component(
  20. CVSNT_TypeLib_Win32
  21. "[HKEY_CLASSES_ROOT\\TypeLib\\{2BDF7A65-0BFE-4B1A-9205-9AB900C7D0DA}\\1.0\\0\\win32]"
  22. PATH)
  23. get_filename_component(
  24. CVSNT_Services_EventMessagePath
  25. "[HKEY_LOCAL_MACHINE\\SYSTEM\\ControlSet001\\Services\\Eventlog\\Application\\cvsnt;EventMessageFile]"
  26. PATH)
  27. # WinCVS (in case CVSNT was installed in the same directory)
  28. get_filename_component(
  29. WinCVS_Folder_Command
  30. "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\Folder\\shell\\wincvs\\command]"
  31. PATH)
  32. # TortoiseCVS (in case CVSNT was installed in the same directory)
  33. get_filename_component(
  34. TortoiseCVS_Folder_Command
  35. "[HKEY_CLASSES_ROOT\\CVS\\shell\\open\\command]"
  36. PATH)
  37. get_filename_component(
  38. TortoiseCVS_DefaultIcon
  39. "[HKEY_CLASSES_ROOT\\CVS\\DefaultIcon]"
  40. PATH)
  41. find_program(CVS_EXECUTABLE cvs
  42. ${TortoiseCVS_DefaultIcon}
  43. ${TortoiseCVS_Folder_Command}
  44. ${WinCVS_Folder_Command}
  45. ${CVSNT_Services_EventMessagePath}
  46. ${CVSNT_TypeLib_Win32}
  47. "[HKEY_LOCAL_MACHINE\\SOFTWARE\\CVS\\Pserver;InstallPath]"
  48. DOC "CVS command line client"
  49. )
  50. mark_as_advanced(CVS_EXECUTABLE)
  51. # Handle the QUIETLY and REQUIRED arguments and set CVS_FOUND to TRUE if
  52. # all listed variables are TRUE
  53. include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
  54. find_package_handle_standard_args(CVS DEFAULT_MSG CVS_EXECUTABLE)