diff options
Diffstat (limited to 'cmake.deps/cmake')
-rw-r--r-- | cmake.deps/cmake/BuildLibvterm.cmake | 8 | ||||
-rw-r--r-- | cmake.deps/cmake/BuildMsgpack.cmake | 7 | ||||
-rw-r--r-- | cmake.deps/cmake/BuildTreesitter.cmake | 14 | ||||
-rw-r--r-- | cmake.deps/cmake/BuildTreesitterParsers.cmake | 2 | ||||
-rw-r--r-- | cmake.deps/cmake/BuildUTF8proc.cmake | 5 | ||||
-rw-r--r-- | cmake.deps/cmake/BuildWasmtime.cmake | 11 | ||||
-rw-r--r-- | cmake.deps/cmake/GettextCMakeLists.txt | 2 | ||||
-rw-r--r-- | cmake.deps/cmake/LibiconvCMakeLists.txt | 2 | ||||
-rw-r--r-- | cmake.deps/cmake/LibvtermCMakeLists.txt | 28 | ||||
-rw-r--r-- | cmake.deps/cmake/LpegCMakeLists.txt | 2 | ||||
-rw-r--r-- | cmake.deps/cmake/MarkdownParserCMakeLists.txt | 2 | ||||
-rw-r--r-- | cmake.deps/cmake/TreesitterCMakeLists.txt | 17 | ||||
-rw-r--r-- | cmake.deps/cmake/TreesitterParserCMakeLists.txt | 2 |
13 files changed, 32 insertions, 70 deletions
diff --git a/cmake.deps/cmake/BuildLibvterm.cmake b/cmake.deps/cmake/BuildLibvterm.cmake deleted file mode 100644 index 3415d8debe..0000000000 --- a/cmake.deps/cmake/BuildLibvterm.cmake +++ /dev/null @@ -1,8 +0,0 @@ -get_externalproject_options(libvterm ${DEPS_IGNORE_SHA}) -ExternalProject_Add(libvterm - DOWNLOAD_DIR ${DEPS_DOWNLOAD_DIR}/libvterm - PATCH_COMMAND ${CMAKE_COMMAND} -E copy - ${CMAKE_CURRENT_SOURCE_DIR}/cmake/LibvtermCMakeLists.txt - ${DEPS_BUILD_DIR}/src/libvterm/CMakeLists.txt - CMAKE_ARGS ${DEPS_CMAKE_ARGS} - ${EXTERNALPROJECT_OPTIONS}) diff --git a/cmake.deps/cmake/BuildMsgpack.cmake b/cmake.deps/cmake/BuildMsgpack.cmake deleted file mode 100644 index 8f82dab140..0000000000 --- a/cmake.deps/cmake/BuildMsgpack.cmake +++ /dev/null @@ -1,7 +0,0 @@ -get_externalproject_options(msgpack ${DEPS_IGNORE_SHA}) -ExternalProject_Add(msgpack - DOWNLOAD_DIR ${DEPS_DOWNLOAD_DIR}/msgpack - CMAKE_ARGS ${DEPS_CMAKE_ARGS} - -D MSGPACK_BUILD_TESTS=OFF - -D MSGPACK_BUILD_EXAMPLES=OFF - ${EXTERNALPROJECT_OPTIONS}) diff --git a/cmake.deps/cmake/BuildTreesitter.cmake b/cmake.deps/cmake/BuildTreesitter.cmake index 7eb98163b9..f5962c8037 100644 --- a/cmake.deps/cmake/BuildTreesitter.cmake +++ b/cmake.deps/cmake/BuildTreesitter.cmake @@ -1,8 +1,14 @@ +if(ENABLE_WASMTIME) + set(TREESITTER_ARGS -D TREE_SITTER_FEATURE_WASM=ON) +endif() + get_externalproject_options(treesitter ${DEPS_IGNORE_SHA}) ExternalProject_Add(treesitter DOWNLOAD_DIR ${DEPS_DOWNLOAD_DIR}/treesitter - PATCH_COMMAND ${CMAKE_COMMAND} -E copy - ${CMAKE_CURRENT_SOURCE_DIR}/cmake/TreesitterCMakeLists.txt - ${DEPS_BUILD_DIR}/src/treesitter/CMakeLists.txt - CMAKE_ARGS ${DEPS_CMAKE_ARGS} + SOURCE_SUBDIR lib + CMAKE_ARGS ${DEPS_CMAKE_ARGS} ${TREESITTER_ARGS} ${EXTERNALPROJECT_OPTIONS}) + +if(USE_BUNDLED_WASMTIME) + add_dependencies(treesitter wasmtime) +endif() diff --git a/cmake.deps/cmake/BuildTreesitterParsers.cmake b/cmake.deps/cmake/BuildTreesitterParsers.cmake index 837d075d20..060447e6fe 100644 --- a/cmake.deps/cmake/BuildTreesitterParsers.cmake +++ b/cmake.deps/cmake/BuildTreesitterParsers.cmake @@ -28,7 +28,7 @@ function(BuildTSParser) ${EXTERNALPROJECT_OPTIONS}) endfunction() -foreach(lang c lua vim vimdoc query python bash) +foreach(lang c lua vim vimdoc query) BuildTSParser(LANG ${lang}) endforeach() BuildTSParser(LANG markdown CMAKE_FILE MarkdownParserCMakeLists.txt) diff --git a/cmake.deps/cmake/BuildUTF8proc.cmake b/cmake.deps/cmake/BuildUTF8proc.cmake new file mode 100644 index 0000000000..9445e615f0 --- /dev/null +++ b/cmake.deps/cmake/BuildUTF8proc.cmake @@ -0,0 +1,5 @@ +get_externalproject_options(utf8proc ${DEPS_IGNORE_SHA}) +ExternalProject_Add(utf8proc + DOWNLOAD_DIR ${DEPS_DOWNLOAD_DIR}/utf8proc + CMAKE_ARGS ${DEPS_CMAKE_ARGS} + ${EXTERNALPROJECT_OPTIONS}) diff --git a/cmake.deps/cmake/BuildWasmtime.cmake b/cmake.deps/cmake/BuildWasmtime.cmake new file mode 100644 index 0000000000..d3c51ebdc7 --- /dev/null +++ b/cmake.deps/cmake/BuildWasmtime.cmake @@ -0,0 +1,11 @@ +# wasmtime is a chungus -- optimize _extra hard_ to keep nvim svelte +get_externalproject_options(wasmtime ${DEPS_IGNORE_SHA}) +ExternalProject_Add(wasmtime + DOWNLOAD_DIR ${DEPS_DOWNLOAD_DIR}/wasmtime + SOURCE_SUBDIR crates/c-api + CMAKE_ARGS ${DEPS_CMAKE_ARGS} + -D WASMTIME_FASTEST_RUNTIME=ON # build with full LTO + -D WASMTIME_DISABLE_ALL_FEATURES=ON # don't need all that crap... + -D WASMTIME_FEATURE_CRANELIFT=ON # ...except this one (compiles wasm to platform code) + USES_TERMINAL_BUILD TRUE + ${EXTERNALPROJECT_OPTIONS}) diff --git a/cmake.deps/cmake/GettextCMakeLists.txt b/cmake.deps/cmake/GettextCMakeLists.txt index c36f3aada5..722420e830 100644 --- a/cmake.deps/cmake/GettextCMakeLists.txt +++ b/cmake.deps/cmake/GettextCMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.13) +cmake_minimum_required(VERSION 3.16) project(gettext C) add_compile_options(-w) diff --git a/cmake.deps/cmake/LibiconvCMakeLists.txt b/cmake.deps/cmake/LibiconvCMakeLists.txt index e62b479b6b..9181314883 100644 --- a/cmake.deps/cmake/LibiconvCMakeLists.txt +++ b/cmake.deps/cmake/LibiconvCMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.13) +cmake_minimum_required(VERSION 3.16) project(libiconv C) add_compile_options(-w) diff --git a/cmake.deps/cmake/LibvtermCMakeLists.txt b/cmake.deps/cmake/LibvtermCMakeLists.txt deleted file mode 100644 index c197523786..0000000000 --- a/cmake.deps/cmake/LibvtermCMakeLists.txt +++ /dev/null @@ -1,28 +0,0 @@ -cmake_minimum_required(VERSION 3.13) -project(libvterm C) - -add_compile_options(-w) - -include(GNUInstallDirs) - -include_directories(${CMAKE_SOURCE_DIR}/include) -include_directories(${CMAKE_BINARY_DIR}) - -file(GLOB VTERM_SOURCES ${CMAKE_SOURCE_DIR}/src/*.c) -add_library(vterm ${VTERM_SOURCES}) -install(TARGETS vterm ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) - -install(FILES include/vterm.h include/vterm_keycodes.h - DESTINATION include) - -if(NOT WIN32) - file(GLOB BIN_SOURCES ${CMAKE_SOURCE_DIR}/bin/*.c) - foreach(EXE_C ${BIN_SOURCES}) - get_filename_component(target_name ${EXE_C} NAME_WE) - add_executable(${target_name} ${EXE_C}) - target_link_libraries(${target_name} vterm) - install(TARGETS ${target_name} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) - endforeach() -endif() - -# vim: set ft=cmake: diff --git a/cmake.deps/cmake/LpegCMakeLists.txt b/cmake.deps/cmake/LpegCMakeLists.txt index 4dcf3a1b77..ac1da8c062 100644 --- a/cmake.deps/cmake/LpegCMakeLists.txt +++ b/cmake.deps/cmake/LpegCMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.13) +cmake_minimum_required(VERSION 3.16) project (lpeg C) include(GNUInstallDirs) diff --git a/cmake.deps/cmake/MarkdownParserCMakeLists.txt b/cmake.deps/cmake/MarkdownParserCMakeLists.txt index 981bf4dfd7..504acb74a5 100644 --- a/cmake.deps/cmake/MarkdownParserCMakeLists.txt +++ b/cmake.deps/cmake/MarkdownParserCMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.13) +cmake_minimum_required(VERSION 3.16) project(${PARSERLANG} C) add_compile_options(-w) diff --git a/cmake.deps/cmake/TreesitterCMakeLists.txt b/cmake.deps/cmake/TreesitterCMakeLists.txt deleted file mode 100644 index 71174bfe5b..0000000000 --- a/cmake.deps/cmake/TreesitterCMakeLists.txt +++ /dev/null @@ -1,17 +0,0 @@ -cmake_minimum_required(VERSION 3.13) -project(treesitter C) - -add_compile_options(-w) - -add_library(tree-sitter lib/src/lib.c) -target_include_directories(tree-sitter - PRIVATE lib/src lib/include) - -install(FILES - lib/include/tree_sitter/api.h - DESTINATION include/tree_sitter) - -include(GNUInstallDirs) -install(TARGETS tree-sitter DESTINATION ${CMAKE_INSTALL_LIBDIR}) - -# vim: set ft=cmake: diff --git a/cmake.deps/cmake/TreesitterParserCMakeLists.txt b/cmake.deps/cmake/TreesitterParserCMakeLists.txt index 0d4bbf0508..08b942a0ff 100644 --- a/cmake.deps/cmake/TreesitterParserCMakeLists.txt +++ b/cmake.deps/cmake/TreesitterParserCMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.13) +cmake_minimum_required(VERSION 3.16) project(parser C) add_compile_options(-w) |