neovim/cmake/FindTreeSitter.cmake
James McCoy 1451b14873
Align naming of FindTreeSitter cmake file and variables
`find_package(Foo ...)` expects to find a file FindFoo.cmake and the
resulting variables to be named `Foo_...`.  If those don't all match up,
then the detection does not work properly.

Closes #13262
2020-11-09 15:15:03 -05:00

12 lines
385 B
CMake

# - Try to find tree-sitter
# Once done, this will define
#
# TreeSitter_FOUND - system has tree-sitter
# TreeSitter_INCLUDE_DIRS - the tree-sitter include directories
# TreeSitter_LIBRARIES - link these to use tree-sitter
include(LibFindMacros)
libfind_pkg_detect(TreeSitter tree-sitter FIND_PATH tree_sitter/api.h FIND_LIBRARY tree-sitter)
libfind_process(TreeSitter)