aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2020-02-07 21:55:43 +0100
committerGitHub <noreply@github.com>2020-02-07 21:55:43 +0100
commit1f479fffbf220deba897dc969631edfd28f707b3 (patch)
tree2eac893b3bafb1b13ccebfacdd02efa185924ed0
parent120a4c8e253a9c7f4fcd25351d4cb12ca99b4f3e (diff)
parent712298e1d3a8567b9857fa90beaa76e8922452c5 (diff)
downloadrneovim-1f479fffbf220deba897dc969631edfd28f707b3.tar.gz
rneovim-1f479fffbf220deba897dc969631edfd28f707b3.tar.bz2
rneovim-1f479fffbf220deba897dc969631edfd28f707b3.zip
Merge pull request #11830 from teto/treesitter_fix
build: allow to use non-bundled C parser
-rw-r--r--src/nvim/CMakeLists.txt6
-rw-r--r--third-party/cmake/BuildTreesitterParsers.cmake2
2 files changed, 6 insertions, 2 deletions
diff --git a/src/nvim/CMakeLists.txt b/src/nvim/CMakeLists.txt
index 29427c7d08..b2ae3a814d 100644
--- a/src/nvim/CMakeLists.txt
+++ b/src/nvim/CMakeLists.txt
@@ -546,7 +546,11 @@ else()
endif()
set_target_properties(nvim_runtime_deps PROPERTIES FOLDER deps)
-file(COPY ${DEPS_PREFIX}/lib/nvim/parser DESTINATION ${PROJECT_BINARY_DIR}/lib/nvim/)
+# install treesitter parser if bundled
+if(EXISTS ${DEPS_PREFIX}/lib/nvim/parser)
+ file(COPY ${DEPS_PREFIX}/lib/nvim/parser DESTINATION ${PROJECT_BINARY_DIR}/lib/nvim/)
+endif()
+
install(DIRECTORY ${PROJECT_BINARY_DIR}/lib/nvim/
DESTINATION ${CMAKE_INSTALL_LIBDIR}/nvim/
USE_SOURCE_PERMISSIONS)
diff --git a/third-party/cmake/BuildTreesitterParsers.cmake b/third-party/cmake/BuildTreesitterParsers.cmake
index 690a8fbed1..ccc81ae97b 100644
--- a/third-party/cmake/BuildTreesitterParsers.cmake
+++ b/third-party/cmake/BuildTreesitterParsers.cmake
@@ -1,6 +1,6 @@
ExternalProject_Add(treesitter-c
PREFIX ${DEPS_BUILD_DIR}
-URL ${TREESITER_C_URL}
+URL ${TREESITTER_C_URL}
DOWNLOAD_DIR ${DEPS_DOWNLOAD_DIR}/treesitter-c
DOWNLOAD_COMMAND ${CMAKE_COMMAND}
-DPREFIX=${DEPS_BUILD_DIR}