From 1451b1487355e3186d857919c4009934f247064d Mon Sep 17 00:00:00 2001 From: James McCoy Date: Mon, 9 Nov 2020 15:15:03 -0500 Subject: 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 --- cmake/FindTreeSitter.cmake | 11 +++++++++++ cmake/FindTreesitter.cmake | 11 ----------- 2 files changed, 11 insertions(+), 11 deletions(-) create mode 100644 cmake/FindTreeSitter.cmake delete mode 100644 cmake/FindTreesitter.cmake (limited to 'cmake') diff --git a/cmake/FindTreeSitter.cmake b/cmake/FindTreeSitter.cmake new file mode 100644 index 0000000000..ae0928e9f7 --- /dev/null +++ b/cmake/FindTreeSitter.cmake @@ -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) diff --git a/cmake/FindTreesitter.cmake b/cmake/FindTreesitter.cmake deleted file mode 100644 index 8ba3b72d28..0000000000 --- a/cmake/FindTreesitter.cmake +++ /dev/null @@ -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) -- cgit