mirror of
https://github.com/neovim/neovim.git
synced 2025-01-01 17:23:36 -07:00
f05a2891d3
Problem: Dirs "config", "packaging", and "third-party" are all closely related but this is not obvious from the layout. This adds friction for new contributors. Solution: - rename config/ to cmake.config/ - rename test/config/ to test/cmakeconfig/ because it is used in Lua tests: require('test.cmakeconfig.paths'). - rename packaging/ to cmake.packaging/ - rename third-party/ to cmake.deps/ (parallel with .deps/)
22 lines
600 B
Plaintext
22 lines
600 B
Plaintext
cmake_minimum_required(VERSION 2.8.12)
|
|
project(tree-sitter LANGUAGES C)
|
|
|
|
file(GLOB SRC_FILES ${PROJECT_SOURCE_DIR}/lib/src/*.c)
|
|
foreach(sfile ${SRC_FILES})
|
|
get_filename_component(f ${sfile} NAME)
|
|
if(${f} MATCHES "lib.c$")
|
|
list(REMOVE_ITEM SRC_FILES ${sfile})
|
|
endif()
|
|
endforeach()
|
|
include_directories(${PROJECT_SOURCE_DIR}/lib/include)
|
|
add_library(tree-sitter ${SRC_FILES})
|
|
|
|
install(FILES
|
|
lib/include/tree_sitter/api.h
|
|
lib/include/tree_sitter/parser.h
|
|
DESTINATION include/tree_sitter)
|
|
|
|
include(GNUInstallDirs)
|
|
install(TARGETS tree-sitter
|
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
|