Trying to add AppleTvOs support

GitOrigin-RevId: 923552a936613d5e30361bb354709337e8b0a990
This commit is contained in:
Arseny Smirnov 2018-02-15 00:01:28 +03:00
parent e2bbd9ee99
commit 1424b2037e
2 changed files with 25 additions and 1 deletions

View File

@ -93,6 +93,23 @@ elseif (${IOS_PLATFORM} STREQUAL "WATCHSIMULATOR")
set (CMAKE_XCODE_EFFECTIVE_PLATFORMS "-watchsimulator")
set (APPLE_WATCH True)
elseif (${IOS_PLATFORM} STREQUAL "TVOS")
set (IOS_PLATFORM_LOCATION "AppleTvOS.platform")
set (XCODE_IOS_PLATFORM tvos)
# This causes the installers to properly locate the output libraries
set (CMAKE_XCODE_EFFECTIVE_PLATFORMS "-appletvos")
set (APPLE_TV True)
elseif (${IOS_PLATFORM} STREQUAL "TVSIMULATOR")
set (SIMULATOR_FLAG true)
set (IOS_PLATFORM_LOCATION "AppleTvSimulator.platform")
set (XCODE_IOS_PLATFORM tvsimulator)
# This causes the installers to properly locate the output libraries
set (CMAKE_XCODE_EFFECTIVE_PLATFORMS "-tvsimulator")
set (APPLE_TV True)
else (${IOS_PLATFORM} STREQUAL "OS")
message (FATAL_ERROR "Unsupported IOS_PLATFORM value selected. Please choose OS, SIMULATOR, or WATCHOS.")
endif ()
@ -183,6 +200,10 @@ elseif (IOS_PLATFORM STREQUAL "WATCHOS")
set (IOS_ARCH "armv7k")
elseif (IOS_PLATFORM STREQUAL "WATCHSIMULATOR")
set (IOS_ARCH "i386")
elseif (IOS_PLATFORM STREQUAL "TVOS")
set (IOS_ARCH "arm64")
elseif (IOS_PLATFORM STREQUAL "TVSIMULATOR")
set (IOS_ARCH "x86_64")
else()
message (WARNING "Unknown IOS_PLATFORM=<${IOS_PLATFORM}>")
endif()

View File

@ -5,7 +5,7 @@ rm -rf build
mkdir -p build
cd build
platforms="macOS iOS watchOS"
platforms="macOS iOS watchOS tvOS"
for platform in $platforms;
do
echo "Platform = ${platform} Simulator = ${simulator}"
@ -46,6 +46,9 @@ do
if [[ $platform = "watchOS" ]]; then
ios_platform="WATCH${ios_platform}"
fi
if [[ $platform = "tvOS" ]]; then
ios_platform="TV${ios_platform}"
fi
echo $ios_platform
rm -rf $build
mkdir -p $build