summaryrefslogtreecommitdiffstats
path: root/cmake/scripts/ios/Install.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/scripts/ios/Install.cmake')
-rw-r--r--cmake/scripts/ios/Install.cmake86
1 files changed, 86 insertions, 0 deletions
diff --git a/cmake/scripts/ios/Install.cmake b/cmake/scripts/ios/Install.cmake
new file mode 100644
index 0000000..fee7368
--- /dev/null
+++ b/cmake/scripts/ios/Install.cmake
@@ -0,0 +1,86 @@
1# IOS packaging
2
3set(BUNDLE_RESOURCES ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/Default-568h@2x.png
4 ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/Default-667h@2x.png
5 ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/Default-736h@3x.png
6 ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/Default-Landscape-736h@3x.png
7 ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon29x29.png
8 ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon29x29@2x.png
9 ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon40x40.png
10 ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon40x40@2x.png
11 ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon50x50.png
12 ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon50x50@2x.png
13 ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon57x57.png
14 ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon57x57@2x.png
15 ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon60x60.png
16 ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon60x60@2x.png
17 ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon72x72.png
18 ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon72x72@2x.png
19 ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon76x76.png
20 ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/ios/rounded/AppIcon76x76@2x.png)
21
22if(CMAKE_GENERATOR STREQUAL Xcode)
23 set(RESOURCE_LOCATION ${APP_NAME}.app)
24else()
25 set(RESOURCE_LOCATION ".")
26endif()
27
28target_sources(${APP_NAME_LC} PRIVATE ${BUNDLE_RESOURCES})
29foreach(file IN LISTS BUNDLE_RESOURCES)
30 set_source_files_properties(${file} PROPERTIES MACOSX_PACKAGE_LOCATION ${RESOURCE_LOCATION})
31endforeach()
32
33target_sources(${APP_NAME_LC} PRIVATE ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/English.lproj/InfoPlist.strings)
34set_source_files_properties(${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/English.lproj/InfoPlist.strings PROPERTIES MACOSX_PACKAGE_LOCATION "${RESOURCE_LOCATION}/English.lproj")
35
36# Options for code signing propagated as env vars to Codesign.command via Xcode
37set(IOS_CODE_SIGN_IDENTITY "" CACHE STRING "Code Sign Identity")
38if(IOS_CODE_SIGN_IDENTITY)
39 set_target_properties(${APP_NAME_LC} PROPERTIES XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED TRUE
40 XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY ${IOS_CODE_SIGN_IDENTITY})
41endif()
42
43add_custom_command(TARGET ${APP_NAME_LC} POST_BUILD
44 # TODO: Remove in sync with CopyRootFiles-ios expecting the ".bin" file
45 COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:${APP_NAME_LC}>
46 $<TARGET_FILE_DIR:${APP_NAME_LC}>/${APP_NAME}.bin
47
48 COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/DllPaths_generated.h
49 ${CMAKE_BINARY_DIR}/xbmc/DllPaths_generated.h
50 COMMAND "ACTION=build"
51 "TARGET_BUILD_DIR=$<TARGET_FILE_DIR:${APP_NAME_LC}>/.."
52 "TARGET_NAME=${APP_NAME}.app"
53 "APP_NAME=${APP_NAME}"
54 "PRODUCT_NAME=${APP_NAME}"
55 "WRAPPER_EXTENSION=app"
56 "SRCROOT=${CMAKE_BINARY_DIR}"
57 ${CMAKE_SOURCE_DIR}/tools/darwin/Support/CopyRootFiles-ios.command
58 COMMAND "XBMC_DEPENDS=${DEPENDS_PATH}"
59 "TARGET_BUILD_DIR=$<TARGET_FILE_DIR:${APP_NAME_LC}>/.."
60 "TARGET_NAME=${APP_NAME}.app"
61 "APP_NAME=${APP_NAME}"
62 "PRODUCT_NAME=${APP_NAME}"
63 "FULL_PRODUCT_NAME=${APP_NAME}.app"
64 "WRAPPER_EXTENSION=app"
65 "SRCROOT=${CMAKE_BINARY_DIR}"
66 ${CMAKE_SOURCE_DIR}/tools/darwin/Support/copyframeworks-ios.command
67 COMMAND "NATIVEPREFIX=${NATIVEPREFIX}"
68 "PLATFORM_NAME=${PLATFORM}"
69 "CODESIGNING_FOLDER_PATH=$<TARGET_FILE_DIR:${APP_NAME_LC}>"
70 "BUILT_PRODUCTS_DIR=$<TARGET_FILE_DIR:${APP_NAME_LC}>/.."
71 "WRAPPER_NAME=${APP_NAME}.app"
72 "APP_NAME=${APP_NAME}"
73 ${CMAKE_SOURCE_DIR}/tools/darwin/Support/Codesign.command
74)
75
76set(DEPENDS_ROOT_FOR_XCODE ${NATIVEPREFIX}/..)
77configure_file(${CMAKE_SOURCE_DIR}/tools/darwin/packaging/ios/mkdeb-ios.sh.in
78 ${CMAKE_BINARY_DIR}/tools/darwin/packaging/ios/mkdeb-ios.sh @ONLY)
79configure_file(${CMAKE_SOURCE_DIR}/tools/darwin/packaging/migrate_to_kodi_ios.sh.in
80 ${CMAKE_BINARY_DIR}/tools/darwin/packaging/migrate_to_kodi_ios.sh @ONLY)
81
82add_custom_target(deb
83 COMMAND sh ./mkdeb-ios.sh ${CORE_BUILD_CONFIG}
84 WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/tools/darwin/packaging/ios)
85add_dependencies(deb ${APP_NAME_LC})
86