Skip to content

Commit

Permalink
Merge pull request #1391 from ychin/fix-xcode-project-warnings-parall…
Browse files Browse the repository at this point in the history
…el-deployment-target

Fix misc MacVim project warnings in Xcode
  • Loading branch information
ychin committed Mar 18, 2023
2 parents 988f8b5 + e443fb4 commit 01bcda7
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/MacVim/MacVim.xcodeproj/project.pbxproj
Expand Up @@ -890,6 +890,7 @@
29B97313FDCFA39411CA2CEA /* Project object */ = {
isa = PBXProject;
attributes = {
BuildIndependentTargetsInParallel = YES;
LastUpgradeCheck = 0710;
};
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "MacVim" */;
Expand Down
16 changes: 15 additions & 1 deletion src/auto/configure
Expand Up @@ -4792,7 +4792,21 @@ rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
else
if test -z "$MACOSX_DEPLOYMENT_TARGET"; then
macosx_deployment_target=`/usr/bin/sw_vers -productVersion|/usr/bin/sed -e 's/^\([0-9]*\.[0-9]*\).*/\1/'`
# Deployment target not specified. We use the current OS' version. We
# only want to extract the main OS version but not the minor version for
# multiple reasons: it's more predictable if this is built from a CI to
# be deployed out (e.g. Homebrew), and sometimes deployment target
# that is too new will cause Xcode to complain (e.g. macOS is 13.2 while
# Xcode may only support up to 13.1)
macosx_major_version=`/usr/bin/sw_vers -productVersion|/usr/bin/sed -e 's/^\([0-9]*\)\.[0-9]*.*/\1/'`
macosx_minor_version=`/usr/bin/sw_vers -productVersion|/usr/bin/sed -e 's/^[0-9]*\.\([0-9]*\).*/\1/'`
if test "$macosx_major_version" = "10"; then
# Older versions look like 10.X.Y form where X is the main version.
macosx_deployment_target="$macosx_major_version.$macosx_minor_version"
else
# Since 11.0, We have X.Y.Z, where X is the main version.
macosx_deployment_target="$macosx_major_version.0"
fi
XCODEFLAGS="$XCODEFLAGS MACOSX_DEPLOYMENT_TARGET=$macosx_deployment_target"
else
XCODEFLAGS="$XCODEFLAGS MACOSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET"
Expand Down
16 changes: 15 additions & 1 deletion src/configure.ac
Expand Up @@ -298,7 +298,21 @@ if test "$vim_cv_uname_output" = Darwin; then
LDFLAGS="$save_ldflags" ])
else
if test -z "$MACOSX_DEPLOYMENT_TARGET"; then
macosx_deployment_target=`/usr/bin/sw_vers -productVersion|/usr/bin/sed -e 's/^\([[0-9]]*\.[[0-9]]*\).*/\1/'`
# Deployment target not specified. We use the current OS' version. We
# only want to extract the main OS version but not the minor version for
# multiple reasons: it's more predictable if this is built from a CI to
# be deployed out (e.g. Homebrew), and sometimes deployment target
# that is too new will cause Xcode to complain (e.g. macOS is 13.2 while
# Xcode may only support up to 13.1)
macosx_major_version=`/usr/bin/sw_vers -productVersion|/usr/bin/sed -e 's/^\([[0-9]]*\)\.[[0-9]]*.*/\1/'`
macosx_minor_version=`/usr/bin/sw_vers -productVersion|/usr/bin/sed -e 's/^[[0-9]]*\.\([[0-9]]*\).*/\1/'`
if test "$macosx_major_version" = "10"; then
# Older versions look like 10.X.Y form where X is the main version.
macosx_deployment_target="$macosx_major_version.$macosx_minor_version"
else
# Since 11.0, We have X.Y.Z, where X is the main version.
macosx_deployment_target="$macosx_major_version.0"
fi
XCODEFLAGS="$XCODEFLAGS MACOSX_DEPLOYMENT_TARGET=$macosx_deployment_target"
else
XCODEFLAGS="$XCODEFLAGS MACOSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET"
Expand Down

0 comments on commit 01bcda7

Please sign in to comment.