aboutsummaryrefslogtreecommitdiff
path: root/third-party/cmake/BuildLuarocks.cmake
diff options
context:
space:
mode:
authorDundar Goc <gocdundar@gmail.com>2022-05-17 15:08:24 +0200
committerDundar Goc <gocdundar@gmail.com>2022-05-17 17:07:45 +0200
commita4c0c0704308ee18e3a23954c07666f36cfbb930 (patch)
tree35564bf974d20d3e3d7e4490f491bcdd209503ac /third-party/cmake/BuildLuarocks.cmake
parentf49699737c9b24e1af52719974cf3bc770539ef9 (diff)
downloadrneovim-a4c0c0704308ee18e3a23954c07666f36cfbb930.tar.gz
rneovim-a4c0c0704308ee18e3a23954c07666f36cfbb930.tar.bz2
rneovim-a4c0c0704308ee18e3a23954c07666f36cfbb930.zip
revert: "ci: remove mingw job #18580"
This partially reverts commit f8af81445bb48966d54f4a956842d935d009d275. The mingw parts of cmake was removed to see if it was still used (ref: https://github.com/neovim/neovim/pull/18580). It turns out it is, so this will fix that. Closes: https://github.com/neovim/neovim/issues/18597
Diffstat (limited to 'third-party/cmake/BuildLuarocks.cmake')
-rw-r--r--third-party/cmake/BuildLuarocks.cmake16
1 files changed, 13 insertions, 3 deletions
diff --git a/third-party/cmake/BuildLuarocks.cmake b/third-party/cmake/BuildLuarocks.cmake
index 98783d533e..244d1d9fb8 100644
--- a/third-party/cmake/BuildLuarocks.cmake
+++ b/third-party/cmake/BuildLuarocks.cmake
@@ -56,7 +56,7 @@ endif()
# Defaults to 5.1 for bundled LuaJIT/Lua.
set(LUA_VERSION "5.1")
-if(UNIX)
+if(UNIX OR (MINGW AND CMAKE_CROSSCOMPILING))
if(USE_BUNDLED_LUAJIT)
list(APPEND LUAROCKS_OPTS
@@ -94,9 +94,13 @@ if(UNIX)
CONFIGURE_COMMAND ${DEPS_BUILD_DIR}/src/luarocks/configure
--prefix=${HOSTDEPS_INSTALL_DIR} --force-config ${LUAROCKS_OPTS}
INSTALL_COMMAND ${MAKE_PRG} -j1 bootstrap)
-elseif(MSVC)
+elseif(MSVC OR MINGW)
- set(COMPILER_FLAG /MSVC)
+ if(MINGW)
+ set(COMPILER_FLAG /MW)
+ elseif(MSVC)
+ set(COMPILER_FLAG /MSVC)
+ endif()
# Ignore USE_BUNDLED_LUAJIT - always ON for native Win32
BuildLuarocks(INSTALL_COMMAND install.bat /FORCECONFIG /NOREG /NOADMIN /Q /F
@@ -119,6 +123,9 @@ list(APPEND THIRD_PARTY_DEPS luarocks)
if(USE_BUNDLED_LUAJIT)
add_dependencies(luarocks luajit)
+ if(MINGW AND CMAKE_CROSSCOMPILING)
+ add_dependencies(luarocks luajit_host)
+ endif()
elseif(USE_BUNDLED_LUA)
add_dependencies(luarocks lua)
endif()
@@ -189,6 +196,9 @@ if(USE_BUNDLED_BUSTED)
set(LUV_DEPS luacheck)
if(USE_BUNDLED_LUV)
list(APPEND LUV_DEPS luv-static lua-compat-5.3)
+ if(MINGW AND CMAKE_CROSSCOMPILING)
+ list(APPEND LUV_DEPS libuv_host)
+ endif()
set(LUV_ARGS "CFLAGS=-O0 -g3 -fPIC")
if(USE_BUNDLED_LIBUV)
list(APPEND LUV_ARGS LIBUV_DIR=${HOSTDEPS_INSTALL_DIR})