2023-07-01 02:08:06 -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-07-01 02:08:06 -07:00
|
|
|
project(${PARSERLANG} C)
|
|
|
|
|
2023-11-20 04:42:54 -07:00
|
|
|
add_compile_options(-w)
|
2023-07-01 02:08:06 -07:00
|
|
|
set(CMAKE_C_STANDARD 99)
|
|
|
|
|
|
|
|
add_library(markdown MODULE
|
|
|
|
tree-sitter-markdown/src/parser.c
|
|
|
|
tree-sitter-markdown/src/scanner.c)
|
|
|
|
target_include_directories(markdown
|
|
|
|
PRIVATE
|
|
|
|
tree-sitter-markdown/src)
|
|
|
|
|
|
|
|
add_library(markdown_inline MODULE
|
|
|
|
tree-sitter-markdown-inline/src/parser.c
|
|
|
|
tree-sitter-markdown-inline/src/scanner.c)
|
|
|
|
target_include_directories(markdown_inline
|
|
|
|
PRIVATE
|
|
|
|
tree-sitter-markdown-inline/src)
|
|
|
|
|
|
|
|
set_target_properties(
|
|
|
|
markdown markdown_inline
|
|
|
|
PROPERTIES
|
|
|
|
PREFIX ""
|
|
|
|
)
|
|
|
|
|
|
|
|
install(TARGETS markdown markdown_inline LIBRARY DESTINATION lib/nvim/parser)
|
|
|
|
|
|
|
|
# vim: set ft=cmake:
|