blob: db400947760e4f6ef1a68c31066dc691a8d34de0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
if(NOT CMAKE_TOOLCHAIN_FILE)
message(FATAL_ERROR "CMAKE_TOOLCHAIN_FILE required for ios. See ${CMAKE_SOURCE_DIR}/cmake/README.md")
endif()
set(CORE_MAIN_SOURCE ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/XBMCApplication.mm)
set(ARCH_DEFINES -DTARGET_POSIX -DTARGET_DARWIN -DTARGET_DARWIN_IOS)
set(SYSTEM_DEFINES -D_REENTRANT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE
-D__STDC_CONSTANT_MACROS)
set(PLATFORM_DIR platform/darwin)
set(PLATFORMDEFS_DIR platform/posix)
set(CMAKE_SYSTEM_NAME Darwin)
if(WITH_ARCH)
set(ARCH ${WITH_ARCH})
else()
if(CPU STREQUAL armv7)
set(CMAKE_OSX_ARCHITECTURES ${CPU})
set(ARCH arm)
set(NEON True)
elseif(CPU STREQUAL arm64)
set(CMAKE_OSX_ARCHITECTURES ${CPU})
set(ARCH aarch64)
set(NEON True)
else()
message(SEND_ERROR "Unknown CPU: ${CPU}")
endif()
endif()
# Additional SYSTEM_DEFINES
list(APPEND SYSTEM_DEFINES -DHAS_LINUX_NETWORK -DHAS_ZEROCONF)
list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${NATIVEPREFIX})
list(APPEND DEPLIBS "-framework CoreFoundation" "-framework CoreVideo"
"-framework CoreAudio" "-framework AudioToolbox"
"-framework QuartzCore" "-framework MediaPlayer"
"-framework CFNetwork" "-framework CoreGraphics"
"-framework Foundation" "-framework UIKit"
"-framework CoreMedia" "-framework AVFoundation"
"-framework VideoToolbox")
set(ENABLE_OPTICAL OFF CACHE BOOL "" FORCE)
set(CMAKE_XCODE_ATTRIBUTE_TARGETED_DEVICE_FAMILY "1,2")
set(CMAKE_XCODE_ATTRIBUTE_INLINES_ARE_PRIVATE_EXTERN OFF)
set(CMAKE_XCODE_ATTRIBUTE_GCC_SYMBOLS_PRIVATE_EXTERN OFF)
set(CMAKE_XCODE_ATTRIBUTE_COPY_PHASE_STRIP OFF)
# Xcode strips dead code by default which breaks wrapping
set(CMAKE_XCODE_ATTRIBUTE_DEAD_CODE_STRIPPING OFF)
# Unify output directories for iOS packaging scripts
if(NOT CMAKE_GENERATOR MATCHES Xcode)
set(CORE_BUILD_CONFIG "${CORE_BUILD_CONFIG}-iphoneos")
endif()
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CORE_BUILD_DIR}/${CORE_BUILD_CONFIG})
foreach(OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES})
string(TOUPPER ${OUTPUTCONFIG} OUTPUTCONFIG)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${CORE_BUILD_DIR}/${CORE_BUILD_CONFIG})
endforeach()
|