summaryrefslogtreecommitdiffstats
path: root/cmake/scripts/ios
diff options
context:
space:
mode:
authormanuel <manuel@mausz.at>2020-07-02 23:09:26 +0200
committermanuel <manuel@mausz.at>2020-07-02 23:09:26 +0200
commit5f8335c1e49ce108ef3481863833c98efa00411b (patch)
treef02b5c1c9765bb6a14c8eb42bb4f81b9face0b55 /cmake/scripts/ios
parente317daf081a1048904fdf0b548946fa3ba6593a7 (diff)
downloadkodi-pvr-build-5f8335c1e49ce108ef3481863833c98efa00411b.tar.gz
kodi-pvr-build-5f8335c1e49ce108ef3481863833c98efa00411b.tar.bz2
kodi-pvr-build-5f8335c1e49ce108ef3481863833c98efa00411b.zip
sync with upstreamHEADmaster
Diffstat (limited to 'cmake/scripts/ios')
-rw-r--r--cmake/scripts/ios/ArchSetup.cmake61
-rw-r--r--cmake/scripts/ios/Install.cmake99
l---------cmake/scripts/ios/Macros.cmake1
l---------cmake/scripts/ios/PathSetup.cmake1
4 files changed, 0 insertions, 162 deletions
diff --git a/cmake/scripts/ios/ArchSetup.cmake b/cmake/scripts/ios/ArchSetup.cmake
deleted file mode 100644
index b6c626f..0000000
--- a/cmake/scripts/ios/ArchSetup.cmake
+++ /dev/null
@@ -1,61 +0,0 @@
1if(NOT CMAKE_TOOLCHAIN_FILE)
2 message(FATAL_ERROR "CMAKE_TOOLCHAIN_FILE required for ios. See ${CMAKE_SOURCE_DIR}/cmake/README.md")
3endif()
4
5set(CORE_MAIN_SOURCE ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/XBMCApplication.mm)
6
7set(ARCH_DEFINES -D_LINUX -DTARGET_POSIX -DTARGET_DARWIN -DTARGET_DARWIN_IOS)
8set(SYSTEM_DEFINES -D_REENTRANT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE
9 -D__STDC_CONSTANT_MACROS)
10set(PLATFORM_DIR platform/linux)
11set(CMAKE_SYSTEM_NAME Darwin)
12if(WITH_ARCH)
13 set(ARCH ${WITH_ARCH})
14else()
15 if(CPU STREQUAL armv7)
16 set(CMAKE_OSX_ARCHITECTURES ${CPU})
17 set(ARCH arm)
18 set(NEON True)
19 elseif(CPU STREQUAL arm64)
20 set(CMAKE_OSX_ARCHITECTURES ${CPU})
21 set(ARCH aarch64)
22 set(NEON True)
23 else()
24 message(SEND_ERROR "Unknown CPU: ${CPU}")
25 endif()
26endif()
27
28# Additional SYSTEM_DEFINES
29list(APPEND SYSTEM_DEFINES -DHAS_LINUX_NETWORK -DHAS_ZEROCONF)
30
31list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${NATIVEPREFIX})
32
33list(APPEND DEPLIBS "-framework CoreFoundation" "-framework CoreVideo"
34 "-framework CoreAudio" "-framework AudioToolbox"
35 "-framework QuartzCore" "-framework MediaPlayer"
36 "-framework CFNetwork" "-framework CoreGraphics"
37 "-framework Foundation" "-framework UIKit"
38 "-framework CoreMedia" "-framework AVFoundation"
39 "-framework VideoToolbox")
40
41set(ENABLE_OPTICAL OFF CACHE BOOL "" FORCE)
42
43set(CMAKE_XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET "9.0")
44set(CMAKE_XCODE_ATTRIBUTE_TARGETED_DEVICE_FAMILY "1,2")
45
46set(CMAKE_XCODE_ATTRIBUTE_INLINES_ARE_PRIVATE_EXTERN OFF)
47set(CMAKE_XCODE_ATTRIBUTE_GCC_SYMBOLS_PRIVATE_EXTERN OFF)
48set(CMAKE_XCODE_ATTRIBUTE_COPY_PHASE_STRIP OFF)
49
50# Xcode strips dead code by default which breaks wrapping
51set(CMAKE_XCODE_ATTRIBUTE_DEAD_CODE_STRIPPING OFF)
52
53# Unify output directories for iOS packaging scripts
54if(NOT CMAKE_GENERATOR MATCHES Xcode)
55 set(CORE_BUILD_CONFIG "${CORE_BUILD_CONFIG}-iphoneos")
56endif()
57set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CORE_BUILD_DIR}/${CORE_BUILD_CONFIG})
58foreach(OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES})
59 string(TOUPPER ${OUTPUTCONFIG} OUTPUTCONFIG)
60 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${CORE_BUILD_DIR}/${CORE_BUILD_CONFIG})
61endforeach()
diff --git a/cmake/scripts/ios/Install.cmake b/cmake/scripts/ios/Install.cmake
deleted file mode 100644
index 7668e7c..0000000
--- a/cmake/scripts/ios/Install.cmake
+++ /dev/null
@@ -1,99 +0,0 @@
1# IOS packaging
2
3set(BUNDLE_RESOURCES ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-1100-Landscape-2436h@3x.png
4 ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-1100-Portrait-2436h@3x.png
5 ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-1200-Landscape-1792h@2x.png
6 ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-1200-Portrait-2224h@2x.png
7 ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-1200-Landscape-2224h@2x.png
8 ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-1200-Portrait-2388h@2x.png
9 ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-1200-Landscape-2388h@2x.png
10 ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-1200-Landscape-2688h@3x.png
11 ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-1200-Portrait-1792h@2x.png
12 ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-1200-Portrait-2688h@3x.png
13 ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-568h@2x.png
14 ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-700-568h@2x.png
15 ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-700-Landscape@2x~ipad.png
16 ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-700-Portrait@2x~ipad.png
17 ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-700@2x.png
18 ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-800-667h@2x.png
19 ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-800-Landscape-736h@3x.png
20 ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-800-Portrait-736h@3x.png
21 ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-Landscape@2x~ipad.png
22 ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage-Portrait@2x~ipad.png
23 ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/LaunchImage@2x.png
24 ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon29x29.png
25 ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon29x29@2x.png
26 ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon40x40.png
27 ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon40x40@2x.png
28 ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon50x50.png
29 ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon50x50@2x.png
30 ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon57x57.png
31 ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon57x57@2x.png
32 ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon60x60.png
33 ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon60x60@2x.png
34 ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon72x72.png
35 ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon72x72@2x.png
36 ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon76x76.png
37 ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon76x76@2x.png)
38
39target_sources(${APP_NAME_LC} PRIVATE ${BUNDLE_RESOURCES})
40foreach(file IN LISTS BUNDLE_RESOURCES)
41 set_source_files_properties(${file} PROPERTIES MACOSX_PACKAGE_LOCATION .)
42endforeach()
43
44target_sources(${APP_NAME_LC} PRIVATE ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/English.lproj/InfoPlist.strings)
45set_source_files_properties(${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/English.lproj/InfoPlist.strings PROPERTIES MACOSX_PACKAGE_LOCATION "./English.lproj")
46
47# Options for code signing propagated as env vars to Codesign.command via Xcode
48set(IOS_CODE_SIGN_IDENTITY "" CACHE STRING "Code Sign Identity")
49if(IOS_CODE_SIGN_IDENTITY)
50 set_target_properties(${APP_NAME_LC} PROPERTIES XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED TRUE
51 XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY ${IOS_CODE_SIGN_IDENTITY})
52endif()
53
54add_custom_command(TARGET ${APP_NAME_LC} POST_BUILD
55 # TODO: Remove in sync with CopyRootFiles-ios expecting the ".bin" file
56 COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:${APP_NAME_LC}>
57 $<TARGET_FILE_DIR:${APP_NAME_LC}>/${APP_NAME}.bin
58
59 COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/DllPaths_generated.h
60 ${CMAKE_BINARY_DIR}/xbmc/DllPaths_generated.h
61 COMMAND "ACTION=build"
62 "TARGET_BUILD_DIR=$<TARGET_FILE_DIR:${APP_NAME_LC}>/.."
63 "TARGET_NAME=${APP_NAME}.app"
64 "APP_NAME=${APP_NAME}"
65 "PRODUCT_NAME=${APP_NAME}"
66 "WRAPPER_EXTENSION=app"
67 "SRCROOT=${CMAKE_BINARY_DIR}"
68 ${CMAKE_SOURCE_DIR}/tools/darwin/Support/CopyRootFiles-ios.command
69 COMMAND "XBMC_DEPENDS=${DEPENDS_PATH}"
70 "TARGET_BUILD_DIR=$<TARGET_FILE_DIR:${APP_NAME_LC}>/.."
71 "TARGET_NAME=${APP_NAME}.app"
72 "APP_NAME=${APP_NAME}"
73 "PRODUCT_NAME=${APP_NAME}"
74 "FULL_PRODUCT_NAME=${APP_NAME}.app"
75 "WRAPPER_EXTENSION=app"
76 "SRCROOT=${CMAKE_BINARY_DIR}"
77 ${CMAKE_SOURCE_DIR}/tools/darwin/Support/copyframeworks-ios.command
78 COMMAND "XBMC_DEPENDS=${DEPENDS_PATH}"
79 "NATIVEPREFIX=${NATIVEPREFIX}"
80 "PLATFORM_NAME=${PLATFORM}"
81 "CODESIGNING_FOLDER_PATH=$<TARGET_FILE_DIR:${APP_NAME_LC}>"
82 "BUILT_PRODUCTS_DIR=$<TARGET_FILE_DIR:${APP_NAME_LC}>/.."
83 "WRAPPER_NAME=${APP_NAME}.app"
84 "APP_NAME=${APP_NAME}"
85 "CURRENT_ARCH=${ARCH}"
86 ${CMAKE_SOURCE_DIR}/tools/darwin/Support/Codesign.command
87)
88
89set(DEPENDS_ROOT_FOR_XCODE ${NATIVEPREFIX}/..)
90configure_file(${CMAKE_SOURCE_DIR}/tools/darwin/packaging/ios/mkdeb-ios.sh.in
91 ${CMAKE_BINARY_DIR}/tools/darwin/packaging/ios/mkdeb-ios.sh @ONLY)
92configure_file(${CMAKE_SOURCE_DIR}/tools/darwin/packaging/migrate_to_kodi_ios.sh.in
93 ${CMAKE_BINARY_DIR}/tools/darwin/packaging/migrate_to_kodi_ios.sh @ONLY)
94
95add_custom_target(deb
96 COMMAND sh ./mkdeb-ios.sh ${CORE_BUILD_CONFIG}
97 WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/tools/darwin/packaging/ios)
98add_dependencies(deb ${APP_NAME_LC})
99
diff --git a/cmake/scripts/ios/Macros.cmake b/cmake/scripts/ios/Macros.cmake
deleted file mode 120000
index 54c1b28..0000000
--- a/cmake/scripts/ios/Macros.cmake
+++ /dev/null
@@ -1 +0,0 @@
1../osx/Macros.cmake \ No newline at end of file
diff --git a/cmake/scripts/ios/PathSetup.cmake b/cmake/scripts/ios/PathSetup.cmake
deleted file mode 120000
index d7f25b2..0000000
--- a/cmake/scripts/ios/PathSetup.cmake
+++ /dev/null
@@ -1 +0,0 @@
1../osx/PathSetup.cmake \ No newline at end of file