From f8667294151d336ac77b99e47a7a01d4c3cc8b6e Mon Sep 17 00:00:00 2001 From: Arseny Smirnov Date: Fri, 26 Mar 2021 16:56:30 +0300 Subject: [PATCH] update architectures for watchOS in example/ios --- CMake/iOS.cmake | 4 ++-- example/ios/Python-Apple-support.patch | 16 ++++++++++++++++ example/ios/build-openssl.sh | 2 ++ example/ios/build.sh | 1 + 4 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 example/ios/Python-Apple-support.patch diff --git a/CMake/iOS.cmake b/CMake/iOS.cmake index 70f611d57..4a6b213b8 100644 --- a/CMake/iOS.cmake +++ b/CMake/iOS.cmake @@ -197,9 +197,9 @@ if (IOS_PLATFORM STREQUAL "OS") elseif (IOS_PLATFORM STREQUAL "SIMULATOR") set (IOS_ARCH "i386;x86_64") elseif (IOS_PLATFORM STREQUAL "WATCHOS") - set (IOS_ARCH "armv7k") + set (IOS_ARCH "armv7k;arm64_32") elseif (IOS_PLATFORM STREQUAL "WATCHSIMULATOR") - set (IOS_ARCH "i386") + set (IOS_ARCH "i386;x86_64") elseif (IOS_PLATFORM STREQUAL "TVOS") set (IOS_ARCH "arm64") elseif (IOS_PLATFORM STREQUAL "TVSIMULATOR") diff --git a/example/ios/Python-Apple-support.patch b/example/ios/Python-Apple-support.patch new file mode 100644 index 000000000..fc7e9ae01 --- /dev/null +++ b/example/ios/Python-Apple-support.patch @@ -0,0 +1,16 @@ +diff --git a/Makefile b/Makefile +index 695be54..bce31b9 100644 +--- a/Makefile ++++ b/Makefile +@@ -56,9 +56,10 @@ CFLAGS-appletvos.arm64=-fembed-bitcode + PYTHON_CONFIGURE-tvOS=ac_cv_func_sigaltstack=no + + # watchOS targets +-TARGETS-watchOS=watchsimulator.i386 watchos.armv7k ++TARGETS-watchOS=watchsimulator.i386 watchsimulator.x86_64 watchos.armv7k watchos.arm64_32 + CFLAGS-watchOS=-mwatchos-version-min=4.0 + CFLAGS-watchos.armv7k=-fembed-bitcode ++CFLAGS-watchos.arm64_32=-fembed-bitcode + PYTHON_CONFIGURE-watchOS=ac_cv_func_sigaltstack=no + + # override machine types for arm64 diff --git a/example/ios/build-openssl.sh b/example/ios/build-openssl.sh index 8a6df6f83..3477530d6 100755 --- a/example/ios/build-openssl.sh +++ b/example/ios/build-openssl.sh @@ -3,10 +3,12 @@ git clone https://github.com/pybee/Python-Apple-support cd Python-Apple-support git checkout 60b990128d5f1f04c336ff66594574515ab56604 +git apply ../Python-Apple-support.patch cd .. #TODO: change openssl version platforms="macOS iOS watchOS tvOS" +#platforms="watchOS" for platform in $platforms; do echo $platform diff --git a/example/ios/build.sh b/example/ios/build.sh index 7ee8ff2e3..5b4ad9895 100755 --- a/example/ios/build.sh +++ b/example/ios/build.sh @@ -6,6 +6,7 @@ mkdir -p build cd build platforms="macOS iOS watchOS tvOS" +#platforms="watchOS" for platform in $platforms; do echo "Platform = ${platform} Simulator = ${simulator}"