mirror of
https://github.com/neovim/neovim.git
synced 2024-12-29 14:41:06 -07:00
10 lines
455 B
CMake
10 lines
455 B
CMake
|
find_path(TREESITTER_INCLUDE_DIR tree_sitter/api.h)
|
||
|
find_library(TREESITTER_LIBRARY NAMES tree-sitter)
|
||
|
find_package_handle_standard_args(Treesitter DEFAULT_MSG
|
||
|
TREESITTER_LIBRARY TREESITTER_INCLUDE_DIR)
|
||
|
mark_as_advanced(TREESITTER_LIBRARY TREESITTER_INCLUDE_DIR)
|
||
|
|
||
|
add_library(treesitter INTERFACE)
|
||
|
target_include_directories(treesitter SYSTEM BEFORE INTERFACE ${TREESITTER_INCLUDE_DIR})
|
||
|
target_link_libraries(treesitter INTERFACE ${TREESITTER_LIBRARY})
|