mirror of
https://github.com/neovim/neovim.git
synced 2024-12-23 20:55:18 -07:00
cmake: Allow switching from luajit to lua
This commit is contained in:
parent
666d85d3ce
commit
1646a28173
@ -310,8 +310,15 @@ include_directories(SYSTEM ${LIBUV_INCLUDE_DIRS})
|
||||
find_package(Msgpack 1.0.0 REQUIRED)
|
||||
include_directories(SYSTEM ${MSGPACK_INCLUDE_DIRS})
|
||||
|
||||
find_package(LuaJit REQUIRED)
|
||||
include_directories(SYSTEM ${LUAJIT_INCLUDE_DIRS})
|
||||
option(PREFER_LUAJIT "Prefer LuaJIT over Lua." ON)
|
||||
|
||||
if(PREFER_LUAJIT)
|
||||
find_package(LuaJit REQUIRED)
|
||||
include_directories(SYSTEM ${LUAJIT_INCLUDE_DIRS})
|
||||
else()
|
||||
find_package(Lua REQUIRED)
|
||||
include_directories(SYSTEM ${LUA_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
if(UNIX)
|
||||
option(FEAT_TUI "Enable the Terminal UI" ON)
|
||||
|
@ -291,8 +291,12 @@ list(APPEND NVIM_LINK_LIBRARIES
|
||||
${LIBTERMKEY_LIBRARIES}
|
||||
${UNIBILIUM_LIBRARIES}
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
${LUAJIT_LIBRARIES}
|
||||
)
|
||||
if(PREFER_LUAJIT)
|
||||
list(APPEND NVIM_LINK_LIBRARIES ${LUAJIT_LIBRARIES})
|
||||
else()
|
||||
list(APPEND NVIM_LINK_LIBRARIES ${LUA_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(UNIX)
|
||||
list(APPEND NVIM_LINK_LIBRARIES
|
||||
|
Loading…
Reference in New Issue
Block a user