diff options
author | fuzzard <bmurphy@bcmcs.net> | 2019-07-30 16:06:47 +1000 |
---|---|---|
committer | Brent Murphy <bmurphy@bcmcs.net> | 2020-01-08 19:08:12 +1000 |
commit | 98319266af04ca3a0ef130f5abb7e3fc5f383481 (patch) | |
tree | 24c668f8c9a8f4ff6283b977c042ef188a890356 /cmake/scripts/darwin_embedded | |
parent | 5b152cd2f32568e87ee8ba0b3e7f9870028dcca2 (diff) |
[tvOS] add binary-addons to xcode project
binary-addon building added to xcode project for tvOS.
The default behaviour is to add all addons to the project, but not add as a dependency.
This means the addons will NOT be built be default.
Documentation updated and shows how to selectively build addons if required and how to
add the auto building dependecy to the Xcode project.
Diffstat (limited to 'cmake/scripts/darwin_embedded')
-rw-r--r-- | cmake/scripts/darwin_embedded/ArchSetup.cmake | 2 | ||||
-rw-r--r-- | cmake/scripts/darwin_embedded/Install.cmake | 15 |
2 files changed, 17 insertions, 0 deletions
diff --git a/cmake/scripts/darwin_embedded/ArchSetup.cmake b/cmake/scripts/darwin_embedded/ArchSetup.cmake index a2be3b7e76..27f403b8af 100644 --- a/cmake/scripts/darwin_embedded/ArchSetup.cmake +++ b/cmake/scripts/darwin_embedded/ArchSetup.cmake @@ -57,6 +57,8 @@ enable_arc() # Xcode strips dead code by default which breaks wrapping set(CMAKE_XCODE_ATTRIBUTE_DEAD_CODE_STRIPPING OFF) +option(ENABLE_XCODE_ADDONBUILD "Enable Xcode automatic addon building?" OFF) + # Unify output directories for iOS/tvOS packaging scripts set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CORE_BUILD_DIR}/${CORE_BUILD_CONFIG}) foreach(OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES}) diff --git a/cmake/scripts/darwin_embedded/Install.cmake b/cmake/scripts/darwin_embedded/Install.cmake index ae8337bfa4..106cfc9bed 100644 --- a/cmake/scripts/darwin_embedded/Install.cmake +++ b/cmake/scripts/darwin_embedded/Install.cmake @@ -80,6 +80,21 @@ set_target_properties(${APP_NAME_LC} PROPERTIES XCODE_ATTRIBUTE_CODE_SIGN_IDENTI XCODE_ATTRIBUTE_DEVELOPMENT_TEAM "${DEVELOPMENT_TEAM}" 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) +endif() + add_custom_command(TARGET ${APP_NAME_LC} POST_BUILD # TODO: Remove in sync with CopyRootFiles-darwin_embedded expecting the ".bin" file COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:${APP_NAME_LC}> |