Kiibohd Controller
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

FindCtags.cmake 1.1KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. # The module defines the following variables:
  2. # CTAGS_EXECUTABLE - path to ctags command line client
  3. # CTAGS_FOUND - true if the command line client was found
  4. # CTAGS_VERSION_STRING - the version of ctags found (since CMake 2.8.8)
  5. # Example usage:
  6. # find_package( Ctags )
  7. # if( CTAGS_FOUND )
  8. # message("ctags found: ${CTAGS_EXECUTABLE}")
  9. # endif()
  10. find_program( CTAGS_EXECUTABLE
  11. NAMES ctags
  12. DOC "ctags executable"
  13. )
  14. mark_as_advanced( CTAGS_EXECUTABLE )
  15. if( CTAGS_EXECUTABLE )
  16. execute_process(COMMAND ${CTAGS_EXECUTABLE} --version
  17. OUTPUT_VARIABLE ctags_version
  18. ERROR_QUIET
  19. OUTPUT_STRIP_TRAILING_WHITESPACE
  20. )
  21. if( ctags_version MATCHES "^Exuberant Ctags [0-9]" )
  22. string( REPLACE "Exuberant Ctags " "" CTAGS_VERSION_STRING "${ctags_version}" )
  23. string( REGEX REPLACE ",.*$" "" CTAGS_VERSION_STRING ${CTAGS_VERSION_STRING} )
  24. endif()
  25. unset( ctags_version )
  26. endif()
  27. # Handle the QUIETLY and REQUIRED arguments and set CTAGS_FOUND to TRUE if
  28. # all listed variables are TRUE
  29. include( FindPackageHandleStandardArgs )
  30. find_package_handle_standard_args( Ctags
  31. REQUIRED_VARS CTAGS_EXECUTABLE
  32. VERSION_VAR CTAGS_VERSION_STRING
  33. )