mirror of
https://github.com/neovim/neovim.git
synced 2024-12-23 20:55:18 -07: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:
parent
42ffa2d62e
commit
1451b14873
@ -374,8 +374,8 @@ include_directories(SYSTEM ${MSGPACK_INCLUDE_DIRS})
|
||||
find_package(LibLUV 1.30.0 REQUIRED)
|
||||
include_directories(SYSTEM ${LIBLUV_INCLUDE_DIRS})
|
||||
|
||||
find_package(Treesitter REQUIRED)
|
||||
include_directories(SYSTEM ${TREESITTER_INCLUDE_DIRS})
|
||||
find_package(TreeSitter REQUIRED)
|
||||
include_directories(SYSTEM ${TreeSitter_INCLUDE_DIRS})
|
||||
|
||||
# Note: The test lib requires LuaJIT; it will be skipped if LuaJIT is missing.
|
||||
option(PREFER_LUA "Prefer Lua over LuaJIT in the nvim executable." OFF)
|
||||
|
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)
|
@ -445,7 +445,7 @@ list(APPEND NVIM_LINK_LIBRARIES
|
||||
${LIBTERMKEY_LIBRARIES}
|
||||
${UNIBILIUM_LIBRARIES}
|
||||
${UTF8PROC_LIBRARIES}
|
||||
${TREESITTER_LIBRARIES}
|
||||
${TreeSitter_LIBRARIES}
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user