neovim/cmake.deps/cmake/TreesitterParserCMakeLists.txt
dundargoc 63e67468b4
build: use CMAKE_POSITION_INDEPENDENT_CODE instead of -fPIC (#21947)
It's simpler to let cmake figure out what flags to add to each platforms
to create position independent code rather than handling it ourselves.

Also remove code that sets POSITION_INDEPENDENT_CODE property on SHARED
and MODULE libraries, as it's already on by default.
2023-01-22 18:02:02 +01:00

23 lines
362 B
CMake

cmake_minimum_required(VERSION 3.10)
project(parser C)
set(CMAKE_C_STANDARD 99)
file(GLOB source_files src/*.c)
add_library(parser
MODULE
${source_files}
)
set_target_properties(
parser
PROPERTIES
OUTPUT_NAME ${PARSERLANG}
PREFIX ""
)
include_directories(src)
install(TARGETS parser LIBRARY DESTINATION lib/nvim/parser)
# vim: set ft=cmake: