diff options
author | Christian Clason <c.clason@uni-graz.at> | 2022-07-19 16:10:59 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-19 16:10:59 +0200 |
commit | 9e15bdde3ba8c84177d6d912eef3c0e056a76bb9 (patch) | |
tree | ab4aa3618e35d658702ac5c7e89521db9b3001be /cmake.deps/cmake/BuildLuajit.cmake | |
parent | 871ff8d62f336e0d11aeab4f44e4318caefc51e4 (diff) | |
download | rneovim-9e15bdde3ba8c84177d6d912eef3c0e056a76bb9.tar.gz rneovim-9e15bdde3ba8c84177d6d912eef3c0e056a76bb9.tar.bz2 rneovim-9e15bdde3ba8c84177d6d912eef3c0e056a76bb9.zip |
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.
Diffstat (limited to 'cmake.deps/cmake/BuildLuajit.cmake')
-rw-r--r-- | cmake.deps/cmake/BuildLuajit.cmake | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/cmake.deps/cmake/BuildLuajit.cmake b/cmake.deps/cmake/BuildLuajit.cmake index c8d5b39398..9b393310d6 100644 --- a/cmake.deps/cmake/BuildLuajit.cmake +++ b/cmake.deps/cmake/BuildLuajit.cmake @@ -60,17 +60,10 @@ set(BUILDCMD_UNIX ${MAKE_PRG} CFLAGS=-fPIC CCDEBUG+=-g Q=) +# Setting MACOSX_DEPLOYMENT_TARGET is mandatory for LuaJIT; use version set by +# cmake.deps/CMakeLists.txt (either environment variable or current system version). if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") - if(CMAKE_OSX_DEPLOYMENT_TARGET) - set(DEPLOYMENT_TARGET "MACOSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET}") - else() - execute_process(COMMAND sw_vers -productVersion - OUTPUT_VARIABLE MACOS_VERSION - OUTPUT_STRIP_TRAILING_WHITESPACE) - set(DEPLOYMENT_TARGET "MACOSX_DEPLOYMENT_TARGET=${MACOS_VERSION}") - endif() -else() - set(DEPLOYMENT_TARGET "") + set(DEPLOYMENT_TARGET "MACOSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET}") endif() if((UNIX AND NOT APPLE) OR (APPLE AND NOT CMAKE_OSX_ARCHITECTURES)) |