mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
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
This commit is contained in:
11
cmake/FindTreeSitter.cmake
Normal file
11
cmake/FindTreeSitter.cmake
Normal file
@@ -0,0 +1,11 @@
|
||||
# - 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)
|
||||
@@ -1,11 +0,0 @@
|
||||
# - 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)
|
||||
Reference in New Issue
Block a user