mirror of
https://github.com/neovim/neovim.git
synced 2026-04-24 08:15:41 +00:00
Merge pull request #3839 from justinmk/reprobuilds
semver (semantic versioning) compliance
This commit is contained in:
@@ -51,15 +51,25 @@ if(NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE "Dev" CACHE STRING "Choose the type of build." FORCE)
|
||||
endif()
|
||||
|
||||
# If not in a git repo (e.g., a tarball) these tokens set the version string,
|
||||
# otherwise the result of `git describe` is used.
|
||||
# If not in a git repo (e.g., a tarball) these tokens define the complete
|
||||
# version string, else it is combined with the result of `git describe`.
|
||||
set(NVIM_VERSION_MAJOR 0)
|
||||
set(NVIM_VERSION_MINOR 1)
|
||||
set(NVIM_VERSION_PATCH 1)
|
||||
set(NVIM_VERSION_PATCH 2)
|
||||
set(NVIM_VERSION_PRERELEASE "-dev") # for package maintainers
|
||||
|
||||
file(TO_CMAKE_PATH ${CMAKE_CURRENT_LIST_DIR}/.git FORCED_GIT_DIR)
|
||||
include(GetGitRevisionDescription)
|
||||
git_describe(NVIM_VERSION_MEDIUM)
|
||||
get_git_head_revision(GIT_REFSPEC NVIM_VERSION_COMMIT)
|
||||
if(NVIM_VERSION_COMMIT) # is a git repo
|
||||
git_describe(NVIM_VERSION_MEDIUM)
|
||||
# `git describe` annotates the most recent tagged release; for pre-release
|
||||
# builds we must replace that with the unreleased version.
|
||||
string(REGEX REPLACE "^v[0-9]+\\.[0-9]+\\.[0-9]+"
|
||||
"v${NVIM_VERSION_MAJOR}.${NVIM_VERSION_MINOR}.${NVIM_VERSION_PATCH}"
|
||||
NVIM_VERSION_MEDIUM
|
||||
${NVIM_VERSION_MEDIUM})
|
||||
endif()
|
||||
|
||||
set(NVIM_VERSION_BUILD_TYPE "${CMAKE_BUILD_TYPE}")
|
||||
# NVIM_VERSION_CFLAGS set further below.
|
||||
|
||||
8
third-party/cmake/BuildLibuv.cmake
vendored
8
third-party/cmake/BuildLibuv.cmake
vendored
@@ -41,18 +41,18 @@ set(UNIX_CFGCMD sh ${DEPS_BUILD_DIR}/src/libuv/autogen.sh &&
|
||||
CC=${DEPS_C_COMPILER})
|
||||
|
||||
if(UNIX)
|
||||
BuildLibUv(
|
||||
BuildLibuv(
|
||||
CONFIGURE_COMMAND ${UNIX_CFGCMD}
|
||||
INSTALL_COMMAND ${MAKE_PRG} V=1 install)
|
||||
|
||||
elseif(MINGW AND CMAKE_CROSSCOMPILING)
|
||||
# Build libuv for the host
|
||||
BuildLibUv(TARGET libuv_host
|
||||
BuildLibuv(TARGET libuv_host
|
||||
CONFIGURE_COMMAND sh ${DEPS_BUILD_DIR}/src/libuv_host/autogen.sh && ${DEPS_BUILD_DIR}/src/libuv_host/configure --with-pic --disable-shared --prefix=${HOSTDEPS_INSTALL_DIR} CC=${HOST_C_COMPILER}
|
||||
INSTALL_COMMAND ${MAKE_PRG} V=1 install)
|
||||
|
||||
# Build libuv for the target
|
||||
BuildLibUv(
|
||||
BuildLibuv(
|
||||
CONFIGURE_COMMAND ${UNIX_CFGCMD} --host=${CROSS_TARGET}
|
||||
INSTALL_COMMAND ${MAKE_PRG} V=1 install)
|
||||
|
||||
@@ -70,7 +70,7 @@ elseif(WIN32 AND MSVC)
|
||||
else()
|
||||
set(VS_ARCH x64)
|
||||
endif()
|
||||
BuildLibUv(
|
||||
BuildLibuv(
|
||||
# By default this creates Debug builds
|
||||
BUILD_COMMAND set PYTHON=${PYTHON_EXECUTABLE} COMMAND ${DEPS_BUILD_DIR}/src/libuv/vcbuild.bat static debug ${VS_ARCH}
|
||||
INSTALL_COMMAND ${CMAKE_COMMAND} -E make_directory ${DEPS_INSTALL_DIR}/lib
|
||||
|
||||
Reference in New Issue
Block a user