mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 03:05:11 -07:00
[Backport release-0.9] build: add luajit runtime files when installing (#23556)
build: add luajit runtime files when installing
Closes https://github.com/neovim/neovim/issues/15543.
(cherry picked from commit 36c4a58acf
)
Co-authored-by: dundargoc <gocdundar@gmail.com>
This commit is contained in:
parent
c0c95bc823
commit
ac93bd3817
@ -122,8 +122,7 @@ elseif(MINGW)
|
|||||||
COMMAND ${CMAKE_COMMAND} -E copy ${DEPS_BUILD_DIR}/src/luajit/src/libluajit.a ${DEPS_LIB_DIR}
|
COMMAND ${CMAKE_COMMAND} -E copy ${DEPS_BUILD_DIR}/src/luajit/src/libluajit.a ${DEPS_LIB_DIR}
|
||||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${DEPS_INSTALL_DIR}/include/luajit-2.1
|
COMMAND ${CMAKE_COMMAND} -E make_directory ${DEPS_INSTALL_DIR}/include/luajit-2.1
|
||||||
COMMAND ${CMAKE_COMMAND} -DFROM_GLOB=${DEPS_BUILD_DIR}/src/luajit/src/*.h -DTO=${DEPS_INSTALL_DIR}/include/luajit-2.1 -P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/CopyFilesGlob.cmake
|
COMMAND ${CMAKE_COMMAND} -DFROM_GLOB=${DEPS_BUILD_DIR}/src/luajit/src/*.h -DTO=${DEPS_INSTALL_DIR}/include/luajit-2.1 -P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/CopyFilesGlob.cmake
|
||||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${DEPS_BIN_DIR}/lua/jit
|
COMMAND ${CMAKE_COMMAND} -E copy_directory ${DEPS_BUILD_DIR}/src/luajit/src/jit ${DEPS_INSTALL_DIR}/share/luajit-2.1.0-beta3/jit
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${DEPS_BUILD_DIR}/src/luajit/src/jit ${DEPS_BIN_DIR}/lua/jit
|
|
||||||
)
|
)
|
||||||
elseif(MSVC)
|
elseif(MSVC)
|
||||||
|
|
||||||
@ -139,8 +138,7 @@ elseif(MSVC)
|
|||||||
COMMAND ${CMAKE_COMMAND} -E copy ${DEPS_BUILD_DIR}/src/luajit/src/lua51.lib ${DEPS_LIB_DIR}/luajit.lib
|
COMMAND ${CMAKE_COMMAND} -E copy ${DEPS_BUILD_DIR}/src/luajit/src/lua51.lib ${DEPS_LIB_DIR}/luajit.lib
|
||||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${DEPS_INSTALL_DIR}/include/luajit-2.1
|
COMMAND ${CMAKE_COMMAND} -E make_directory ${DEPS_INSTALL_DIR}/include/luajit-2.1
|
||||||
COMMAND ${CMAKE_COMMAND} -DFROM_GLOB=${DEPS_BUILD_DIR}/src/luajit/src/*.h -DTO=${DEPS_INSTALL_DIR}/include/luajit-2.1 -P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/CopyFilesGlob.cmake
|
COMMAND ${CMAKE_COMMAND} -DFROM_GLOB=${DEPS_BUILD_DIR}/src/luajit/src/*.h -DTO=${DEPS_INSTALL_DIR}/include/luajit-2.1 -P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/CopyFilesGlob.cmake
|
||||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${DEPS_BIN_DIR}/lua/jit
|
COMMAND ${CMAKE_COMMAND} -E copy_directory ${DEPS_BUILD_DIR}/src/luajit/src/jit ${DEPS_INSTALL_DIR}/share/luajit-2.1.0-beta3/jit
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${DEPS_BUILD_DIR}/src/luajit/src/jit ${DEPS_BIN_DIR}/lua/jit
|
|
||||||
)
|
)
|
||||||
else()
|
else()
|
||||||
message(FATAL_ERROR "Trying to build luajit in an unsupported system ${CMAKE_SYSTEM_NAME}/${CMAKE_C_COMPILER_ID}")
|
message(FATAL_ERROR "Trying to build luajit in an unsupported system ${CMAKE_SYSTEM_NAME}/${CMAKE_C_COMPILER_ID}")
|
||||||
|
@ -276,6 +276,7 @@ set(LUA_FILETYPE_MODULE_SOURCE ${PROJECT_SOURCE_DIR}/runtime/lua/vim/filetype.lu
|
|||||||
set(LUA_INIT_PACKAGES_MODULE_SOURCE ${PROJECT_SOURCE_DIR}/runtime/lua/vim/_init_packages.lua)
|
set(LUA_INIT_PACKAGES_MODULE_SOURCE ${PROJECT_SOURCE_DIR}/runtime/lua/vim/_init_packages.lua)
|
||||||
set(LUA_KEYMAP_MODULE_SOURCE ${PROJECT_SOURCE_DIR}/runtime/lua/vim/keymap.lua)
|
set(LUA_KEYMAP_MODULE_SOURCE ${PROJECT_SOURCE_DIR}/runtime/lua/vim/keymap.lua)
|
||||||
set(CHAR_BLOB_GENERATOR ${GENERATOR_DIR}/gen_char_blob.lua)
|
set(CHAR_BLOB_GENERATOR ${GENERATOR_DIR}/gen_char_blob.lua)
|
||||||
|
set(LUAJIT_RUNTIME_DIR ${DEPS_PREFIX}/share/luajit-2.1.0-beta3/jit)
|
||||||
|
|
||||||
glob_wrapper(UNICODE_FILES ${UNICODE_DIR}/*.txt)
|
glob_wrapper(UNICODE_FILES ${UNICODE_DIR}/*.txt)
|
||||||
glob_wrapper(API_HEADERS api/*.h)
|
glob_wrapper(API_HEADERS api/*.h)
|
||||||
@ -778,6 +779,15 @@ install(DIRECTORY ${BINARY_LIB_DIR}
|
|||||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/nvim/
|
DESTINATION ${CMAKE_INSTALL_LIBDIR}/nvim/
|
||||||
USE_SOURCE_PERMISSIONS)
|
USE_SOURCE_PERMISSIONS)
|
||||||
|
|
||||||
|
if(NOT PREFER_LUA)
|
||||||
|
# install luajit runtime files if bundled
|
||||||
|
if(EXISTS ${LUAJIT_RUNTIME_DIR})
|
||||||
|
install(DIRECTORY ${LUAJIT_RUNTIME_DIR}
|
||||||
|
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/nvim/runtime/lua
|
||||||
|
USE_SOURCE_PERMISSIONS)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
add_library(libnvim STATIC EXCLUDE_FROM_ALL)
|
add_library(libnvim STATIC EXCLUDE_FROM_ALL)
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
set(LIBNVIM_NAME libnvim)
|
set(LIBNVIM_NAME libnvim)
|
||||||
|
Loading…
Reference in New Issue
Block a user