1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

cmake: support iOS armv7 build

This commit is contained in:
gaoshan 2020-11-06 11:35:38 +08:00 committed by Andy Green
parent 8e876be816
commit ce1bb10988

View file

@ -4,7 +4,7 @@
# Options:
#
# IOS_PLATFORM = OS (default) or SIMULATOR or SIMULATOR64
# IOS_PLATFORM = OS (default) or OS32 or SIMULATOR or SIMULATOR64
# This decides if SDKS will be selected from the iPhoneOS.platform or iPhoneSimulator.platform folders
# OS - the default, used to build for iPhone and iPad physical devices, which have an arm arch.
# SIMULATOR - used to build for the Simulator platforms, which have an x86 arch.
@ -120,6 +120,11 @@ set (BUILD_ARM64 ${BUILD_ARM64} CACHE STRING "Build arm64 arch or not")
if (${IOS_PLATFORM} STREQUAL "OS")
set (IOS_PLATFORM_LOCATION "iPhoneOS.platform")
# This causes the installers to properly locate the output libraries
set (CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphoneos")
elseif (${IOS_PLATFORM} STREQUAL "OS32")
set (IOS_PLATFORM_LOCATION "iPhoneOS.platform")
# This causes the installers to properly locate the output libraries
set (CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphoneos")
elseif (${IOS_PLATFORM} STREQUAL "SIMULATOR")
@ -172,6 +177,8 @@ set (CMAKE_OSX_SYSROOT ${CMAKE_IOS_SDK_ROOT} CACHE PATH "Sysroot used for iOS su
# set the architecture for iOS
if (${IOS_PLATFORM} STREQUAL "OS")
set (IOS_ARCH arm64)
elseif (${IOS_PLATFORM} STREQUAL "OS32")
set (IOS_ARCH armv7)
elseif (${IOS_PLATFORM} STREQUAL "SIMULATOR")
set (IOS_ARCH i386)
elseif (${IOS_PLATFORM} STREQUAL "SIMULATOR64")