diff options
author | fuzzard <fuzzard@users.noreply.github.com> | 2020-03-27 17:46:53 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-27 17:46:53 +1000 |
commit | 52e308d34de0b4112f45268b616077e3ba448eb2 (patch) | |
tree | 882bf933a6fe342ab53ebf4f5e2de51b0c875479 | |
parent | 63b1d906b5d6d15376998c44362dff0ad10eb56b (diff) | |
parent | f37b82d2c1696a64909a52be5571ba4455d11392 (diff) |
Merge pull request #17554 from fuzzard/ios-xcodebinaryaddon
[darwin_embedded] enable xcode project binary addon build for ios
-rw-r--r-- | cmake/scripts/darwin_embedded/Install.cmake | 22 | ||||
-rw-r--r-- | docs/README.iOS.md | 42 |
2 files changed, 51 insertions, 13 deletions
diff --git a/cmake/scripts/darwin_embedded/Install.cmake b/cmake/scripts/darwin_embedded/Install.cmake index 106cfc9bed..72936eac4e 100644 --- a/cmake/scripts/darwin_embedded/Install.cmake +++ b/cmake/scripts/darwin_embedded/Install.cmake @@ -81,19 +81,17 @@ set_target_properties(${APP_NAME_LC} PROPERTIES XCODE_ATTRIBUTE_CODE_SIGN_IDENTI XCODE_ATTRIBUTE_PROVISIONING_PROFILE_SPECIFIER "${PROVISIONING_PROFILE_APP}") # Create xcode target that allows to build binary-addons. -if(CORE_PLATFORM_NAME_LC STREQUAL tvos) - if(ADDONS_TO_BUILD) - set(_addons "ADDONS=${ADDONS_TO_BUILD}") - endif() - add_custom_target(binary-addons - COMMAND $(MAKE) -C ${CMAKE_SOURCE_DIR}/tools/depends/target/binary-addons clean - COMMAND $(MAKE) -C ${CMAKE_SOURCE_DIR}/tools/depends/target/binary-addons VERBOSE=1 V=99 - INSTALL_PREFIX="${CMAKE_BINARY_DIR}/addons" CROSS_COMPILING=yes ${_addons}) - if(ENABLE_XCODE_ADDONBUILD) - add_dependencies(${APP_NAME_LC} binary-addons) - endif() - unset(_addons) +if(ADDONS_TO_BUILD) + set(_addons "ADDONS=${ADDONS_TO_BUILD}") +endif() +add_custom_target(binary-addons + COMMAND $(MAKE) -C ${CMAKE_SOURCE_DIR}/tools/depends/target/binary-addons clean + COMMAND $(MAKE) -C ${CMAKE_SOURCE_DIR}/tools/depends/target/binary-addons VERBOSE=1 V=99 + INSTALL_PREFIX="${CMAKE_BINARY_DIR}/addons" CROSS_COMPILING=yes ${_addons}) +if(ENABLE_XCODE_ADDONBUILD) + add_dependencies(${APP_NAME_LC} binary-addons) endif() +unset(_addons) add_custom_command(TARGET ${APP_NAME_LC} POST_BUILD # TODO: Remove in sync with CopyRootFiles-darwin_embedded expecting the ".bin" file diff --git a/docs/README.iOS.md b/docs/README.iOS.md index 66876dfa08..da03618f55 100644 --- a/docs/README.iOS.md +++ b/docs/README.iOS.md @@ -8,7 +8,9 @@ This guide has been tested with macOS 10.13.4(17E199) High Sierra and 10.14.4(18 2. **[Prerequisites](#2-prerequisites)** 3. **[Get the source code](#3-get-the-source-code)** 4. **[Configure and build tools and dependencies](#4-configure-and-build-tools-and-dependencies)** -5. **[Build binary add-ons](#5-build-binary-add-ons)** +5. **[Build binary add-ons](#5-build-binary-add-ons)** + 5.1. **[Independent Add-on building](#51-Independent-Add-on-building)** + 5.2. **[Xcode project building](#52-Xcode-project-building)** 6. **[Build Kodi](#6-build-kodi)** 6.1. **[Generate Project Files](#61-Generate-Project-Files)** 6.2. **[Build with Xcode](#62-build)** @@ -104,8 +106,11 @@ make -j$(getconf _NPROCESSORS_ONLN) **[back to top](#table-of-contents)** | **[back to section top](#4-configure-and-build-tools-and-dependencies)** ## 5. Build binary add-ons + You can find a complete list of available binary add-ons **[here](https://github.com/xbmc/repo-binary-addons)**. +## 5.1. Independent Add-on building + Change to Kodi's source code directory: ``` cd $HOME/kodi @@ -126,6 +131,41 @@ Build a specific group of add-ons: make -j$(getconf _NPROCESSORS_ONLN) -C tools/depends/target/binary-addons ADDONS="pvr.*" ``` +## 5.2. Xcode project building + +Binary addons will be built as a dependency in the Xcode project. You can choose the addons +you wish to build during the Xcode project generation step + +Generate Xcode project to build specific add-ons: +```sh +make -C tools/depends/target/cmakebuildsys CMAKE_EXTRA_ARGUMENTS="-DENABLE_XCODE_ADDONBUILD=ON -DADDONS_TO_BUILD='audioencoder.flac pvr.vdr.vnsi audiodecoder.snesapu'" +``` + +Generate Xcode project to build a specific group of add-ons: +```sh +make -C tools/depends/target/cmakebuildsys CMAKE_EXTRA_ARGUMENTS="-DENABLE_XCODE_ADDONBUILD=ON -DADDONS_TO_BUILD='pvr.*'" +``` + +**TIP:** When using addontype.* for -DADDONS_TO_BUILD argument, you cannot have multiple +addon types. ie -DADDONS_TO_BUILD='game.libretro.* peripheral.*' is not valid. You will +need to individually list the addons as per the first example for specific addon building. + +Generate Xcode project to build all add-ons automatically: +```sh +make -C tools/depends/target/cmakebuildsys CMAKE_EXTRA_ARGUMENTS="-DENABLE_XCODE_ADDONBUILD=ON" +``` + +**TIP:** If you wish to not automatically build addons added to your xcode project, omit +`-DENABLE_XCODE_ADDONBUILD=ON`. The target will be added to the project, but the dependency + will not be set to automatically build +**TIP:** Binary add-ons added to the generated Xcode project can be built independently of +the Kodi app by selecting the scheme/target `binary-addons` in the Xcode project. +You can also build the binary-addons target via xcodebuild. This will not build the Kodi +App, but will build any/all binary addons added for the project Generation. +```sh +xcodebuild -config "Debug" -target binary-addons +``` + **[back to top](#table-of-contents)** ## 6. Build Kodi |