2022-08-03 05:56:57 -07:00
|
|
|
cmake_minimum_required(VERSION 3.10)
|
2023-11-20 04:42:54 -07:00
|
|
|
# Can be removed once minimum version is at least 3.15
|
|
|
|
if(POLICY CMP0092)
|
|
|
|
cmake_policy(SET CMP0092 NEW)
|
|
|
|
endif()
|
2023-04-04 10:27:21 -07:00
|
|
|
project(treesitter C)
|
2023-03-24 02:22:15 -07:00
|
|
|
|
2023-11-20 04:42:54 -07:00
|
|
|
add_compile_options(-w)
|
|
|
|
|
2023-01-24 00:55:56 -07:00
|
|
|
add_library(tree-sitter lib/src/lib.c)
|
2023-01-24 08:43:29 -07:00
|
|
|
target_include_directories(tree-sitter
|
|
|
|
PRIVATE lib/src lib/include)
|
2020-11-04 02:44:00 -07:00
|
|
|
|
|
|
|
install(FILES
|
|
|
|
lib/include/tree_sitter/api.h
|
|
|
|
lib/include/tree_sitter/parser.h
|
|
|
|
DESTINATION include/tree_sitter)
|
|
|
|
|
|
|
|
include(GNUInstallDirs)
|
2023-01-24 00:55:56 -07:00
|
|
|
install(TARGETS tree-sitter DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
2022-10-21 02:47:27 -07:00
|
|
|
|
|
|
|
# vim: set ft=cmake:
|