neovim/cmake.deps/cmake/MarkdownParserCMakeLists.txt
dundargoc 404fdb0f36 build: cmake fixes
- add EXTERNALPROJECT_OPTIONS variable to main build
- use `REQUIRED` keyword for IWYU.
- remove check_c_compiler_flag checks when `ENABLE_COMPILER_SUGGESTIONS`
  is `ON`. If we explicitly enable it then we probably want it to give
  an error if it doesn't exist, rather than silently skip it.
- Move dependency interface libraries to their find module and use them
  as a pseudo-imported target.
- Remove BUSTED_OUTPUT_TYPE. It's not used and we can reintroduce it
  again if something similar is needed.
- Use LINK_OPTIONS intead of LINK_FLAGS when generating the `--version`
  output.
2023-12-16 21:06:28 +01:00

33 lines
763 B
CMake

cmake_minimum_required(VERSION 3.13)
# Can be removed once minimum version is at least 3.15
if(POLICY CMP0092)
cmake_policy(SET CMP0092 NEW)
endif()
project(${PARSERLANG} C)
add_compile_options(-w)
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: