diff options
Diffstat (limited to 'third-party/CMakeLists.txt')
| -rw-r--r-- | third-party/CMakeLists.txt | 46 |
1 files changed, 44 insertions, 2 deletions
diff --git a/third-party/CMakeLists.txt b/third-party/CMakeLists.txt index 9cc0df098c..4bce9040b0 100644 --- a/third-party/CMakeLists.txt +++ b/third-party/CMakeLists.txt @@ -12,6 +12,7 @@ option(USE_BUNDLED "Use bundled dependencies." ON) option(USE_BUNDLED_LIBUNIBILIUM "Use the bundled libunibilium." ${USE_BUNDLED}) option(USE_BUNDLED_LIBTERMKEY "Use the bundled libtermkey." ${USE_BUNDLED}) +option(USE_BUNDLED_LIBVTERM "Use the bundled libvterm." ${USE_BUNDLED}) option(USE_BUNDLED_LIBUV "Use the bundled libuv." ${USE_BUNDLED}) option(USE_BUNDLED_MSGPACK "Use the bundled msgpack." ${USE_BUNDLED}) option(USE_BUNDLED_LUAJIT "Use the bundled version of luajit." ${USE_BUNDLED}) @@ -66,6 +67,10 @@ set(LIBUNIBILIUM_SHA1 32c07797f298e5bc722ce14b6b9a2cae68e3c018) set(LIBTERMKEY_URL https://github.com/neovim/libtermkey/archive/8c0cb7108cc63218ea19aa898968eede19e19603.tar.gz) set(LIBTERMKEY_SHA1 54e8b6914dab10d4467d2a563f80053a99849fcb) +set(LIBVTERM_URL https://github.com/neovim/libvterm/archive/ec80d6cc2f331263b76ec40acb4e6b2184a969d9.tar.gz) +set(LIBVTERM_SHA1 4e3cf232977bb829baa1746c20e846dd054981c0) + + if(USE_BUNDLED_LIBUNIBILIUM) ExternalProject_Add(libunibilium PREFIX ${DEPS_BUILD_DIR} @@ -111,6 +116,29 @@ if(USE_BUNDLED_LIBTERMKEY) add_dependencies(libtermkey libunibilium) endif() +if(USE_BUNDLED_LIBVTERM) + ExternalProject_Add(libvterm + PREFIX ${DEPS_BUILD_DIR} + URL ${LIBVTERM_URL} + DOWNLOAD_DIR ${DEPS_DOWNLOAD_DIR}/libvterm + DOWNLOAD_COMMAND ${CMAKE_COMMAND} + -DPREFIX=${DEPS_BUILD_DIR} + -DDOWNLOAD_DIR=${DEPS_DOWNLOAD_DIR}/libvterm + -DURL=${LIBVTERM_URL} + -DEXPECTED_SHA1=${LIBVTERM_SHA1} + -DTARGET=libvterm + -P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/DownloadAndExtractFile.cmake + CONFIGURE_COMMAND "" + BUILD_IN_SOURCE 1 + BUILD_COMMAND "" + INSTALL_COMMAND ${MAKE_PRG} CC=${DEPS_C_COMPILER} + PREFIX=${DEPS_INSTALL_DIR} + CFLAGS=-fPIC + install) + list(APPEND THIRD_PARTY_DEPS libvterm) +endif() + + if(USE_BUNDLED_LIBUV) ExternalProject_Add(libuv PREFIX ${DEPS_BUILD_DIR} @@ -211,10 +239,24 @@ if(USE_BUNDLED_LUAROCKS) add_dependencies(luarocks luajit) endif() + add_custom_command(OUTPUT ${DEPS_LIB_DIR}/luarocks/rocks/stable-busted-deps + COMMAND ${DEPS_BIN_DIR}/luarocks ARGS install lua_cliargs 2.3-3 + COMMAND ${DEPS_BIN_DIR}/luarocks ARGS install luafilesystem 1.5.0 + COMMAND ${DEPS_BIN_DIR}/luarocks ARGS install dkjson 2.5-1 + COMMAND ${DEPS_BIN_DIR}/luarocks ARGS install say 1.2-1 + COMMAND ${DEPS_BIN_DIR}/luarocks ARGS install luassert 1.7.2-0 + COMMAND ${DEPS_BIN_DIR}/luarocks ARGS install ansicolors 1.0.2-3 + COMMAND ${DEPS_BIN_DIR}/luarocks ARGS install penlight 1.0.0-1 + COMMAND ${DEPS_BIN_DIR}/luarocks ARGS install mediator_lua 1.1-3 + COMMAND touch ${DEPS_LIB_DIR}/luarocks/rocks/stable-busted-deps + DEPENDS luarocks) + add_custom_target(stable-busted-deps + DEPENDS ${DEPS_LIB_DIR}/luarocks/rocks/stable-busted-deps) + add_custom_command(OUTPUT ${DEPS_BIN_DIR}/busted COMMAND ${DEPS_BIN_DIR}/luarocks ARGS build busted 2.0.rc4 CC=${DEPS_C_COMPILER} LD=${DEPS_C_COMPILER} - DEPENDS luarocks) + DEPENDS stable-busted-deps) add_custom_target(busted DEPENDS ${DEPS_BIN_DIR}/busted) @@ -244,7 +286,7 @@ if(USE_BUNDLED_LUAROCKS) add_custom_target(nvim-client DEPENDS ${DEPS_LIB_DIR}/luarocks/rocks/nvim-client) - list(APPEND THIRD_PARTY_DEPS busted lua-messagepack lpeg nvim-client) + list(APPEND THIRD_PARTY_DEPS stable-busted-deps busted lua-messagepack lpeg nvim-client) endif() add_custom_target(third-party ALL |