diff options
author | Daniel Hahler <git@thequod.de> | 2019-06-24 08:48:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-24 08:48:54 +0200 |
commit | 433c136a8a274539fb58c2a2ef4f606dd7829fef (patch) | |
tree | 68ef8ff2dd54b0e61d2490338c624326141edc67 | |
parent | 93297cfc6f2c4e8407d2884521397939a2e7081d (diff) | |
download | rneovim-433c136a8a274539fb58c2a2ef4f606dd7829fef.tar.gz rneovim-433c136a8a274539fb58c2a2ef4f606dd7829fef.tar.bz2 rneovim-433c136a8a274539fb58c2a2ef4f606dd7829fef.zip |
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).
-rw-r--r-- | third-party/cmake/BuildLuarocks.cmake | 9 |
1 files changed, 9 insertions, 0 deletions
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( |