mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 03:05:11 -07:00
Change to enable build by Ninja on Windows
This commit is contained in:
parent
35cc15e157
commit
828c9baad2
9
third-party/CMakeLists.txt
vendored
9
third-party/CMakeLists.txt
vendored
@ -81,6 +81,15 @@ if(CMAKE_GENERATOR MATCHES "Makefiles")
|
||||
set(MAKE_PRG "$(MAKE)")
|
||||
endif()
|
||||
|
||||
if(MINGW AND CMAKE_GENERATOR MATCHES "Ninja")
|
||||
find_program(MAKE_PRG NAMES mingw32-make)
|
||||
if(NOT MAKE_PRG)
|
||||
message(FATAL_ERROR "GNU Make for mingw32 is required to build the dependecies.")
|
||||
else()
|
||||
message(STATUS "Found GNU Make for mingw32 at ${MAKE_PRG}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(CMAKE_C_COMPILER_ARG1)
|
||||
set(DEPS_C_COMPILER "${CMAKE_C_COMPILER} ${CMAKE_C_COMPILER_ARG1}")
|
||||
else()
|
||||
|
7
third-party/cmake/BuildLibuv.cmake
vendored
7
third-party/cmake/BuildLibuv.cmake
vendored
@ -66,10 +66,15 @@ elseif(MINGW AND CMAKE_CROSSCOMPILING)
|
||||
|
||||
elseif(MINGW)
|
||||
|
||||
if(CMAKE_GENERATOR MATCHES "Ninja")
|
||||
set(LIBUV_MAKE_PRG ${MAKE_PRG})
|
||||
else()
|
||||
set(LIBUV_MAKE_PRG ${CMAKE_MAKE_PROGRAM})
|
||||
endif()
|
||||
# Native MinGW
|
||||
BuildLibUv(BUILD_IN_SOURCE
|
||||
PATCH_COMMAND ${LIBUV_PATCH_COMMAND}
|
||||
BUILD_COMMAND ${CMAKE_MAKE_PROGRAM} -f Makefile.mingw
|
||||
BUILD_COMMAND ${LIBUV_MAKE_PRG} -f Makefile.mingw
|
||||
INSTALL_COMMAND ${CMAKE_COMMAND} -E make_directory ${DEPS_INSTALL_DIR}/lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${DEPS_BUILD_DIR}/src/libuv/libuv.a ${DEPS_INSTALL_DIR}/lib
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${DEPS_INSTALL_DIR}/include
|
||||
|
10
third-party/cmake/BuildLuajit.cmake
vendored
10
third-party/cmake/BuildLuajit.cmake
vendored
@ -78,8 +78,12 @@ elseif(MINGW AND CMAKE_CROSSCOMPILING)
|
||||
|
||||
elseif(MINGW)
|
||||
|
||||
|
||||
BuildLuaJit(BUILD_COMMAND ${CMAKE_MAKE_PROGRAM} CC=${DEPS_C_COMPILER}
|
||||
if(CMAKE_GENERATOR MATCHES "Ninja")
|
||||
set(LUAJIT_MAKE_PRG ${MAKE_PRG})
|
||||
else()
|
||||
set(LUAJIT_MAKE_PRG ${CMAKE_MAKE_PROGRAM})
|
||||
endif()
|
||||
BuildLuaJit(BUILD_COMMAND ${LUAJIT_MAKE_PRG} CC=${DEPS_C_COMPILER}
|
||||
PREFIX=${DEPS_INSTALL_DIR}
|
||||
CFLAGS+=-DLUAJIT_DISABLE_JIT
|
||||
CFLAGS+=-DLUA_USE_APICHECK
|
||||
@ -87,7 +91,7 @@ elseif(MINGW)
|
||||
CCDEBUG+=-g
|
||||
BUILDMODE=static
|
||||
# Build a DLL too
|
||||
COMMAND ${CMAKE_MAKE_PROGRAM} CC=${DEPS_C_COMPILER} BUILDMODE=dynamic
|
||||
COMMAND ${LUAJIT_MAKE_PRG} CC=${DEPS_C_COMPILER} BUILDMODE=dynamic
|
||||
|
||||
INSTALL_COMMAND ${CMAKE_COMMAND} -E make_directory ${DEPS_INSTALL_DIR}/bin
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${DEPS_BUILD_DIR}/src/luajit/src/luajit.exe ${DEPS_INSTALL_DIR}/bin
|
||||
|
Loading…
Reference in New Issue
Block a user