mirror of
https://github.com/neovim/neovim.git
synced 2025-09-05 19:08:15 +00:00
build(macos): use consistent MACOSX_DEPLOYMENT_TARGET (#19430)
Use the same logic for both deps (including LuaJIT, for which setting this variable is mandatory) and Nvim: either the eponymous environment variable if set, or the current software version if not. Removes annoying warnings when building locally on macOS.
This commit is contained in:
@@ -132,6 +132,18 @@ if(CMAKE_OSX_ARCHITECTURES)
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
# If the macOS deployment target is not set manually (via $MACOSX_DEPLOYMENT_TARGET),
|
||||
# fall back to local system version. Needs to be done here and in top-level CMakeLists.txt.
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||
if(NOT CMAKE_OSX_DEPLOYMENT_TARGET)
|
||||
execute_process(COMMAND sw_vers -productVersion
|
||||
OUTPUT_VARIABLE MACOS_VERSION
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET "${MACOS_VERSION}")
|
||||
endif()
|
||||
message("-- Using deployment target ${CMAKE_OSX_DEPLOYMENT_TARGET}")
|
||||
endif()
|
||||
|
||||
set(HOSTDEPS_INSTALL_DIR "${DEPS_INSTALL_DIR}")
|
||||
set(HOSTDEPS_BIN_DIR "${DEPS_BIN_DIR}")
|
||||
set(HOSTDEPS_LIB_DIR "${DEPS_LIB_DIR}")
|
||||
|
Reference in New Issue
Block a user