Skip to content

Commit

Permalink
[apple] xcode 11 support for mac/ios/tvos
Browse files Browse the repository at this point in the history
  • Loading branch information
fuzzard committed Sep 24, 2019
1 parent 2474f37 commit e0760ad
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions tools/depends/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,8 @@ case $host in
esac

# setup which sdk to use
found_sdk_version=[`$use_xcodebuild -showsdks | sed -E -n 's/.*macosx([0-9]+)\.([0-9]+)/\1.\2/p' | sort -n -t. -k1,1 -k2,2 | tail -n 1`]
target_platform=macosx
found_sdk_version=[`$use_xcodebuild -showsdks | grep "\-sdk $target_platform" | awk '{ print $2}'`]
use_sdk="${use_sdk:-$found_sdk_version}"

# now that we know which sdk, error check sdk_name
Expand All @@ -342,10 +343,11 @@ case $host in
10.12);;
10.13);;
10.14);;
10.15);;
*)
AC_MSG_ERROR(error in configure of --with-sdk=$use_sdk)
esac
sdk_name=macosx$use_sdk
sdk_name=$target_platform$use_sdk
platform_min_version="macosx-version-min=10.9"

use_sdk_path=[`$use_xcodebuild -version -sdk $sdk_name Path`]
Expand All @@ -370,14 +372,15 @@ case $host in
platform_min_version="$target_platform-version-min=9.0"
fi

found_sdk_version=[`$use_xcodebuild -showsdks | grep $target_platform | sort | tail -n 1 | awk '{ print $2}'`]
found_sdk_version=[`$use_xcodebuild -showsdks | grep "\-sdk $target_platform" | awk '{ print $2}'`]
use_sdk="${use_sdk:-$found_sdk_version}"
sdk_name=$target_platform$use_sdk

if test "$use_platform" = "tvos"; then
case $use_sdk in
11.*);;
12.*);;
13.*);;
*)
AC_MSG_ERROR(error in configure of --with-sdk=$use_sdk)
;;
Expand All @@ -388,6 +391,7 @@ case $host in
10.*);;
11.*);;
12.*);;
13.*);;
*)
AC_MSG_ERROR(error in configure of --with-sdk=$use_sdk)
;;
Expand Down Expand Up @@ -452,8 +456,8 @@ case $use_platform in
platform_ldflags="-lpthread"
;;
tvos)
platform_cflags+=" -fembed-bitcode"
platform_cxxflags+=" -fembed-bitcode"
platform_cflags+=" -fembed-bitcode"
platform_cxxflags+=" -fembed-bitcode"
if test "$platform_os" != "darwin_embedded"; then
AC_MSG_ERROR([$use_platform is only supported on the darwin_embedded platform])
fi
Expand Down

0 comments on commit e0760ad

Please sign in to comment.