From 433c136a8a274539fb58c2a2ef4f606dd7829fef Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Mon, 24 Jun 2019 08:48:54 +0200 Subject: build: luarocks: fall back to luajit (#10297) This regressed in 204ec6337. Currently it would detect/use lua5.3 from the system, but in general luajit is / should be preferred. Noticed this due to nvim-client failing to build with Lua 5.3 (https://github.com/neovim/lua-client/pull/43). --- third-party/cmake/BuildLuarocks.cmake | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/third-party/cmake/BuildLuarocks.cmake b/third-party/cmake/BuildLuarocks.cmake index 140c50ba0d..425bb049c8 100644 --- a/third-party/cmake/BuildLuarocks.cmake +++ b/third-party/cmake/BuildLuarocks.cmake @@ -61,6 +61,15 @@ if(UNIX OR (MINGW AND CMAKE_CROSSCOMPILING)) elseif(USE_BUNDLED_LUA) list(APPEND LUAROCKS_OPTS --with-lua=${HOSTDEPS_INSTALL_DIR}) + else() + list(APPEND CMAKE_MODULE_PATH "../cmake") + find_package(LuaJit) + if(LUAJIT_FOUND) + list(APPEND LUAROCKS_OPTS + --lua-version=5.1 + --with-lua-include=${LUAJIT_INCLUDE_DIRS} + --lua-suffix=jit) + endif() endif() BuildLuarocks( -- cgit