mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Merge pull request #13263 from jamessan/tree-sitter-detect
Align naming of FindTreeSitter cmake file and variables
This commit is contained in:
commit
bb7ed42089
@ -374,8 +374,8 @@ include_directories(SYSTEM ${MSGPACK_INCLUDE_DIRS})
|
|||||||
find_package(LibLUV 1.30.0 REQUIRED)
|
find_package(LibLUV 1.30.0 REQUIRED)
|
||||||
include_directories(SYSTEM ${LIBLUV_INCLUDE_DIRS})
|
include_directories(SYSTEM ${LIBLUV_INCLUDE_DIRS})
|
||||||
|
|
||||||
find_package(Treesitter REQUIRED)
|
find_package(TreeSitter REQUIRED)
|
||||||
include_directories(SYSTEM ${TREESITTER_INCLUDE_DIRS})
|
include_directories(SYSTEM ${TreeSitter_INCLUDE_DIRS})
|
||||||
|
|
||||||
# Note: The test lib requires LuaJIT; it will be skipped if LuaJIT is missing.
|
# 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)
|
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}
|
${LIBTERMKEY_LIBRARIES}
|
||||||
${UNIBILIUM_LIBRARIES}
|
${UNIBILIUM_LIBRARIES}
|
||||||
${UTF8PROC_LIBRARIES}
|
${UTF8PROC_LIBRARIES}
|
||||||
${TREESITTER_LIBRARIES}
|
${TreeSitter_LIBRARIES}
|
||||||
${CMAKE_THREAD_LIBS_INIT}
|
${CMAKE_THREAD_LIBS_INIT}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user