build: USE_BUNDLED_LUV=0 with USE_BUNDLED_LUAROCKS=1 #10291

Fixes https://github.com/neovim/neovim/issues/10289
This commit is contained in:
Daniel Hahler
2019-06-22 03:43:31 +02:00
committed by Justin M. Keyes
parent aa090f9801
commit 058a8ed6ec

View File

@@ -181,7 +181,9 @@ if(USE_BUNDLED_BUSTED)
DEPENDS busted)
add_custom_target(luacheck
DEPENDS ${LUACHECK_EXE})
set(nvim_client_depends luacheck)
if(USE_BUNDLED_LUV)
set(LUV_DEPS luacheck luv-static lua-compat-5.3)
if(MINGW AND CMAKE_CROSSCOMPILING)
set(LUV_DEPS ${LUV_DEPS} libuv_host)
@@ -199,12 +201,16 @@ if(USE_BUNDLED_BUSTED)
DEPENDS ${LUV_DEPS})
add_custom_target(luv
DEPENDS ${HOSTDEPS_LIB_DIR}/luarocks/rocks/luv)
set(nvim_client_depends luv)
else()
set(nvim_client_depends luacheck)
endif()
# DEPENDS on the previous module, because Luarocks breaks if parallel.
add_custom_command(OUTPUT ${HOSTDEPS_LIB_DIR}/luarocks/rocks/nvim-client
COMMAND ${LUAROCKS_BINARY}
ARGS build nvim-client 0.2.0-1 ${LUAROCKS_BUILDARGS}
DEPENDS luv)
DEPENDS ${nvim_client_depends})
add_custom_target(nvim-client
DEPENDS ${HOSTDEPS_LIB_DIR}/luarocks/rocks/nvim-client)