diff options
47 files changed, 77 insertions, 73 deletions
diff --git a/.gitignore b/.gitignore index bd7eb50bc4..98e29526f4 100644 --- a/.gitignore +++ b/.gitignore @@ -305,11 +305,10 @@ cmake_install.cmake # /tools/darwin/ /tools/darwin/Configurations/App.xcconfig /tools/darwin/Configurations/Common.xcconfig -/tools/darwin/packaging/ios/mkdeb-ios.sh -/tools/darwin/packaging/atv2/mkdeb-atv2.sh +/tools/darwin/packaging/darwin_embedded/mkdeb-darwin_embedded.sh /tools/darwin/packaging/osx/mkdmg-osx.sh /tools/darwin/packaging/osx/VolumeIcon.icns -/tools/darwin/packaging/migrate_to_kodi_ios.sh +/tools/darwin/packaging/darwin_embedded/migrate_to_kodi.sh /tools/darwin/packaging/seatbeltunlock/mkdeb-seatbeltunlock.sh /tools/darwin/runtime/XBMCHelper diff --git a/CMakeLists.txt b/CMakeLists.txt index 54e9bd7d49..c683b14334 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -300,6 +300,7 @@ set(OTHER_FILES cmake/README.md) # Subdirs core_add_subdirs_from_filelist(${CMAKE_SOURCE_DIR}/cmake/treedata/common/*.txt ${CMAKE_SOURCE_DIR}/cmake/treedata/common/${CORE_PLATFORM_NAME_LC}/*.txt + ${CMAKE_SOURCE_DIR}/cmake/treedata/${CORE_SYSTEM_NAME}/${CORE_PLATFORM_NAME_LC}/*.txt ${CMAKE_SOURCE_DIR}/cmake/treedata/${CORE_SYSTEM_NAME}/*.txt) core_add_optional_subdirs_from_filelist(${CMAKE_SOURCE_DIR}/cmake/treedata/optional/common/*.txt ${CMAKE_SOURCE_DIR}/cmake/treedata/optional/${CORE_SYSTEM_NAME}/*.txt) @@ -339,9 +340,9 @@ if(WIN32) endif() elseif(CORE_SYSTEM_NAME STREQUAL android) # Nothing -elseif(CORE_SYSTEM_NAME STREQUAL ios) +elseif(CORE_SYSTEM_NAME STREQUAL darwin_embedded) set_target_properties(${APP_NAME_LC} PROPERTIES OUTPUT_NAME ${APP_NAME} - MACOSX_BUNDLE_INFO_PLIST ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/Info.plist.in) + MACOSX_BUNDLE_INFO_PLIST ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/${CORE_PLATFORM_NAME}/Info.plist.in) else() set_target_properties(${APP_NAME_LC} PROPERTIES SUFFIX ${APP_BINARY_SUFFIX}) endif() diff --git a/cmake/installdata/ios/fontconfig.txt b/cmake/installdata/darwin_embedded/fontconfig.txt index 1f1bd9d50b..1f1bd9d50b 100644 --- a/cmake/installdata/ios/fontconfig.txt +++ b/cmake/installdata/darwin_embedded/fontconfig.txt diff --git a/cmake/installdata/ios/packaging.txt b/cmake/installdata/darwin_embedded/packaging.txt index 3d5ae4a0ba..3d5ae4a0ba 100644 --- a/cmake/installdata/ios/packaging.txt +++ b/cmake/installdata/darwin_embedded/packaging.txt diff --git a/cmake/installdata/ios/runtime.txt b/cmake/installdata/darwin_embedded/runtime.txt index 3bb546754e..3bb546754e 100644 --- a/cmake/installdata/ios/runtime.txt +++ b/cmake/installdata/darwin_embedded/runtime.txt diff --git a/cmake/modules/FindOpenGLES.cmake b/cmake/modules/FindOpenGLES.cmake index 0191d9e78c..43a1367a52 100644 --- a/cmake/modules/FindOpenGLES.cmake +++ b/cmake/modules/FindOpenGLES.cmake @@ -18,7 +18,7 @@ if(PKG_CONFIG_FOUND) pkg_check_modules(PC_OPENGLES ${_brcmprefix}glesv2 QUIET) endif() -if(NOT CORE_SYSTEM_NAME STREQUAL ios) +if(NOT CORE_SYSTEM_NAME STREQUAL darwin_embedded) find_path(OPENGLES_INCLUDE_DIR GLES2/gl2.h PATHS ${PC_OPENGLES_INCLUDEDIR}) find_library(OPENGLES_gl_LIBRARY NAMES ${_brcmprefix}GLESv2 diff --git a/cmake/platform/darwin_embedded/defines.txt b/cmake/platform/darwin_embedded/defines.txt new file mode 100644 index 0000000000..603d749da2 --- /dev/null +++ b/cmake/platform/darwin_embedded/defines.txt @@ -0,0 +1 @@ +-DTARGET_POSIX -DTARGET_DARWIN -DTARGET_DARWIN_EMBEDDED diff --git a/cmake/platform/ios/ios.cmake b/cmake/platform/darwin_embedded/ios.cmake index 75c9b7b803..4c377b7ae6 100644 --- a/cmake/platform/ios/ios.cmake +++ b/cmake/platform/darwin_embedded/ios.cmake @@ -1,2 +1,3 @@ set(PLATFORM_REQUIRED_DEPS OpenGLES) set(APP_RENDER_SYSTEM gles) +list(APPEND PLATFORM_DEFINES -DTARGET_DARWIN_IOS) diff --git a/cmake/platform/ios/defines.txt b/cmake/platform/ios/defines.txt deleted file mode 100644 index 48491004e3..0000000000 --- a/cmake/platform/ios/defines.txt +++ /dev/null @@ -1 +0,0 @@ --DTARGET_POSIX -DTARGET_DARWIN -DTARGET_DARWIN_IOS diff --git a/cmake/scripts/common/PrepareEnv.cmake b/cmake/scripts/common/PrepareEnv.cmake index 753dca1b80..c305834ed7 100644 --- a/cmake/scripts/common/PrepareEnv.cmake +++ b/cmake/scripts/common/PrepareEnv.cmake @@ -44,7 +44,7 @@ if(CORE_SYSTEM_NAME STREQUAL android) else() message(FATAL_ERROR "Unsupported architecture") endif() -elseif(CORE_SYSTEM_NAME STREQUAL ios) +elseif(CORE_SYSTEM_NAME STREQUAL darwin_embedded) if (CPU MATCHES armv7) set(PLATFORM_TAG ${PLATFORM_TAG}-armv7) elseif (CPU MATCHES arm64) diff --git a/cmake/scripts/ios/ArchSetup.cmake b/cmake/scripts/darwin_embedded/ArchSetup.cmake index db40094776..6cd968ab61 100644 --- a/cmake/scripts/ios/ArchSetup.cmake +++ b/cmake/scripts/darwin_embedded/ArchSetup.cmake @@ -2,9 +2,9 @@ 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(CORE_MAIN_SOURCE ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/${CORE_PLATFORM_NAME}/XBMCApplication.mm) -set(ARCH_DEFINES -DTARGET_POSIX -DTARGET_DARWIN -DTARGET_DARWIN_IOS) +set(ARCH_DEFINES -DTARGET_POSIX -DTARGET_DARWIN -DTARGET_DARWIN_EMBEDDED) set(SYSTEM_DEFINES -D_REENTRANT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D__STDC_CONSTANT_MACROS) set(PLATFORM_DIR platform/darwin) diff --git a/cmake/scripts/ios/Install.cmake b/cmake/scripts/darwin_embedded/Install.cmake index 7668e7cf2c..0e300035bd 100644 --- a/cmake/scripts/ios/Install.cmake +++ b/cmake/scripts/darwin_embedded/Install.cmake @@ -45,14 +45,14 @@ target_sources(${APP_NAME_LC} PRIVATE ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/i set_source_files_properties(${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/ios/English.lproj/InfoPlist.strings PROPERTIES MACOSX_PACKAGE_LOCATION "./English.lproj") # Options for code signing propagated as env vars to Codesign.command via Xcode -set(IOS_CODE_SIGN_IDENTITY "" CACHE STRING "Code Sign Identity") -if(IOS_CODE_SIGN_IDENTITY) +set(CODE_SIGN_IDENTITY "" CACHE STRING "Code Sign Identity") +if(CODE_SIGN_IDENTITY) set_target_properties(${APP_NAME_LC} PROPERTIES XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED TRUE - XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY ${IOS_CODE_SIGN_IDENTITY}) + XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY ${CODE_SIGN_IDENTITY}) endif() add_custom_command(TARGET ${APP_NAME_LC} POST_BUILD - # TODO: Remove in sync with CopyRootFiles-ios expecting the ".bin" file + # TODO: Remove in sync with CopyRootFiles-darwin_embedded expecting the ".bin" file COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:${APP_NAME_LC}> $<TARGET_FILE_DIR:${APP_NAME_LC}>/${APP_NAME}.bin @@ -65,7 +65,7 @@ add_custom_command(TARGET ${APP_NAME_LC} POST_BUILD "PRODUCT_NAME=${APP_NAME}" "WRAPPER_EXTENSION=app" "SRCROOT=${CMAKE_BINARY_DIR}" - ${CMAKE_SOURCE_DIR}/tools/darwin/Support/CopyRootFiles-ios.command + ${CMAKE_SOURCE_DIR}/tools/darwin/Support/CopyRootFiles-darwin_embedded.command COMMAND "XBMC_DEPENDS=${DEPENDS_PATH}" "TARGET_BUILD_DIR=$<TARGET_FILE_DIR:${APP_NAME_LC}>/.." "TARGET_NAME=${APP_NAME}.app" @@ -74,7 +74,7 @@ add_custom_command(TARGET ${APP_NAME_LC} POST_BUILD "FULL_PRODUCT_NAME=${APP_NAME}.app" "WRAPPER_EXTENSION=app" "SRCROOT=${CMAKE_BINARY_DIR}" - ${CMAKE_SOURCE_DIR}/tools/darwin/Support/copyframeworks-ios.command + ${CMAKE_SOURCE_DIR}/tools/darwin/Support/copyframeworks-darwin_embedded.command COMMAND "XBMC_DEPENDS=${DEPENDS_PATH}" "NATIVEPREFIX=${NATIVEPREFIX}" "PLATFORM_NAME=${PLATFORM}" @@ -87,13 +87,13 @@ add_custom_command(TARGET ${APP_NAME_LC} POST_BUILD ) set(DEPENDS_ROOT_FOR_XCODE ${NATIVEPREFIX}/..) -configure_file(${CMAKE_SOURCE_DIR}/tools/darwin/packaging/ios/mkdeb-ios.sh.in - ${CMAKE_BINARY_DIR}/tools/darwin/packaging/ios/mkdeb-ios.sh @ONLY) -configure_file(${CMAKE_SOURCE_DIR}/tools/darwin/packaging/migrate_to_kodi_ios.sh.in - ${CMAKE_BINARY_DIR}/tools/darwin/packaging/migrate_to_kodi_ios.sh @ONLY) +configure_file(${CMAKE_SOURCE_DIR}/tools/darwin/packaging/darwin_embedded/mkdeb-darwin_embedded.sh.in + ${CMAKE_BINARY_DIR}/tools/darwin/packaging/darwin_embedded/mkdeb-darwin_embedded.sh @ONLY) +configure_file(${CMAKE_SOURCE_DIR}/tools/darwin/packaging/darwin_embedded/migrate_to_kodi.sh.in + ${CMAKE_BINARY_DIR}/tools/darwin/packaging/darwin_embedded/migrate_to_kodi.sh @ONLY) add_custom_target(deb - COMMAND sh ./mkdeb-ios.sh ${CORE_BUILD_CONFIG} - WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/tools/darwin/packaging/ios) + COMMAND sh ./mkdeb-darwin_embedded.sh ${CORE_BUILD_CONFIG} + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/tools/darwin/packaging/darwin_embedded) add_dependencies(deb ${APP_NAME_LC}) diff --git a/cmake/scripts/ios/Macros.cmake b/cmake/scripts/darwin_embedded/Macros.cmake index 54c1b280e0..54c1b280e0 120000 --- a/cmake/scripts/ios/Macros.cmake +++ b/cmake/scripts/darwin_embedded/Macros.cmake diff --git a/cmake/scripts/ios/PathSetup.cmake b/cmake/scripts/darwin_embedded/PathSetup.cmake index d7f25b2cad..d7f25b2cad 120000 --- a/cmake/scripts/ios/PathSetup.cmake +++ b/cmake/scripts/darwin_embedded/PathSetup.cmake diff --git a/cmake/scripts/osx/Macros.cmake b/cmake/scripts/osx/Macros.cmake index 52f87d1ca2..5ff88ce0d3 100644 --- a/cmake/scripts/osx/Macros.cmake +++ b/cmake/scripts/osx/Macros.cmake @@ -20,7 +20,7 @@ function(core_link_library lib wraplib) # iOS: EFFECTIVE_PLATFORM_NAME is not resolved # http://public.kitware.com/pipermail/cmake/2016-March/063049.html - if(CORE_SYSTEM_NAME STREQUAL ios AND CMAKE_GENERATOR STREQUAL Xcode) + if(CORE_SYSTEM_NAME STREQUAL darwin_embedded AND CMAKE_GENERATOR STREQUAL Xcode) get_target_property(dir ${lib} BINARY_DIR) set(link_lib ${dir}/${CORE_BUILD_CONFIG}/${CMAKE_STATIC_LIBRARY_PREFIX}${lib}${CMAKE_STATIC_LIBRARY_SUFFIX}) endif() diff --git a/cmake/treedata/darwin_embedded/ios/ios.txt b/cmake/treedata/darwin_embedded/ios/ios.txt new file mode 100644 index 0000000000..c02a0c4ede --- /dev/null +++ b/cmake/treedata/darwin_embedded/ios/ios.txt @@ -0,0 +1,4 @@ +xbmc/cores/RetroPlayer/process/ios cores/RetroPlayer/process/ios +xbmc/cores/VideoPlayer/Process/ios cores/VideoPlayer/Process/ios +xbmc/platform/darwin/ios platform/ios +xbmc/windowing/ios windowing/ios diff --git a/cmake/treedata/ios/subdirs.txt b/cmake/treedata/darwin_embedded/subdirs.txt index 08919e91f2..e3ef8fe634 100644 --- a/cmake/treedata/ios/subdirs.txt +++ b/cmake/treedata/darwin_embedded/subdirs.txt @@ -1,9 +1,6 @@ -xbmc/cores/RetroPlayer/process/ios cores/RetroPlayer/process/ios -xbmc/cores/VideoPlayer/Process/ios cores/VideoPlayer/Process/ios xbmc/input/touch input/touch xbmc/input/touch/generic input/touch/generic xbmc/platform/darwin platform/darwin -xbmc/platform/darwin/ios platform/ios xbmc/platform/darwin/ios-common platform/ios-common xbmc/platform/darwin/network platform/darwin/network xbmc/platform/darwin/storage platform/storage @@ -11,4 +8,3 @@ xbmc/platform/posix posix xbmc/platform/posix/filesystem platform/posix/filesystem xbmc/platform/posix/network platform/posix/network xbmc/platform/posix/utils platform/posix/utils -xbmc/windowing/ios windowing/ios diff --git a/tools/buildsteps/ios/package b/tools/buildsteps/ios/package index 08458ca5b2..81f9030677 100755 --- a/tools/buildsteps/ios/package +++ b/tools/buildsteps/ios/package @@ -3,7 +3,7 @@ XBMC_PLATFORM_DIR=ios . $WORKSPACE/tools/buildsteps/defaultenv cd $WORKSPACE/build;make -j$BUILDTHREADS deb -cd $WORKSPACE/build/tools/darwin/packaging/ios/ +cd $WORKSPACE/build/tools/darwin/packaging/darwin_embedded/ #rename for upload #e.x. kodi-20130314-8c2fb31-Frodo-ios.deb @@ -13,4 +13,5 @@ then else UPLOAD_FILENAME="kodi-$(getBuildRevDateStr)-ios.deb" fi +mkdir $WORKSPACE/tools/darwin/packaging/ios mv *.deb $WORKSPACE/tools/darwin/packaging/ios/$UPLOAD_FILENAME diff --git a/tools/darwin/Support/CopyRootFiles-ios.command b/tools/darwin/Support/CopyRootFiles-darwin_embedded.command index 9bca3a8017..9bca3a8017 100755 --- a/tools/darwin/Support/CopyRootFiles-ios.command +++ b/tools/darwin/Support/CopyRootFiles-darwin_embedded.command diff --git a/tools/darwin/Support/copyframeworks-ios.command b/tools/darwin/Support/copyframeworks-darwin_embedded.command index d52033ebf9..d52033ebf9 100755 --- a/tools/darwin/Support/copyframeworks-ios.command +++ b/tools/darwin/Support/copyframeworks-darwin_embedded.command diff --git a/tools/darwin/packaging/migrate_to_kodi_ios.sh.in b/tools/darwin/packaging/darwin_embedded/migrate_to_kodi.sh.in index be9155fa8c..be9155fa8c 100644 --- a/tools/darwin/packaging/migrate_to_kodi_ios.sh.in +++ b/tools/darwin/packaging/darwin_embedded/migrate_to_kodi.sh.in diff --git a/tools/darwin/packaging/ios/mkdeb-ios.sh.in b/tools/darwin/packaging/darwin_embedded/mkdeb-darwin_embedded.sh.in index 511c214604..fdcb4c557d 100644 --- a/tools/darwin/packaging/ios/mkdeb-ios.sh.in +++ b/tools/darwin/packaging/darwin_embedded/mkdeb-darwin_embedded.sh.in @@ -103,7 +103,7 @@ chmod +x $DIRNAME/$PACKAGE/DEBIAN/prerm # postinst: nothing for now. echo "#!/bin/sh" > $DIRNAME/$PACKAGE/DEBIAN/postinst echo "chown -R mobile:mobile /Applications/@APP_NAME@.app" >> $DIRNAME/$PACKAGE/DEBIAN/postinst -cat $DIRNAME/../migrate_to_kodi_ios.sh >> $DIRNAME/$PACKAGE/DEBIAN/postinst +cat $DIRNAME/migrate_to_kodi.sh >> $DIRNAME/$PACKAGE/DEBIAN/postinst echo "/usr/bin/uicache" >> $DIRNAME/$PACKAGE/DEBIAN/postinst echo "echo 'finish:respringing ...'" >> $DIRNAME/$PACKAGE/DEBIAN/postinst chmod +x $DIRNAME/$PACKAGE/DEBIAN/postinst diff --git a/tools/depends/configure.ac b/tools/depends/configure.ac index 66f7e96ace..dc40d32722 100644 --- a/tools/depends/configure.ac +++ b/tools/depends/configure.ac @@ -364,7 +364,7 @@ case $host in esac fi - platform_os="ios" + platform_os="darwin_embedded" if [ ! test "x$use_cpu" = "xarm64" ]; then platform_cflags+=" -mcpu=cortex-a8 -mfpu=neon" @@ -422,8 +422,8 @@ case $use_platform in platform_ldflags="-lpthread" ;; tvos) - if test "$platform_os" != "ios"; then - AC_MSG_ERROR([$use_platform is only supported on the ios platform]) + if test "$platform_os" != "darwin_embedded"; then + AC_MSG_ERROR([$use_platform is only supported on the darwin_embedded platform]) fi ;; auto) @@ -563,13 +563,13 @@ if test "$platform_os" == "android"; then fi # darwin needs unzip/zip in Codesign.command -if test "$platform_os" = "android" || test "$platform_os" = "osx" || test "$platform_os" = "ios"; then +if test "$platform_os" = "android" || test "$platform_os" = "osx" || test "$platform_os" = "darwin_embedded"; then AC_CHECK_PROG(HAVE_UNZIP,unzip,"yes","no",) if test "x$HAVE_UNZIP" = "xno"; then AC_MSG_ERROR("Missing program: unzip") fi fi -if test "$platform_os" = "osx" || test "$platform_os" = "ios"; then +if test "$platform_os" = "osx" || test "$platform_os" = "darwin_embedded"; then AC_CHECK_PROG(HAVE_ZIP,zip,"yes","no",) if test "x$HAVE_ZIP" = "xno"; then AC_MSG_ERROR("Missing program: zip") @@ -616,7 +616,7 @@ tmp_cxxflags=$(echo $cxx11_flags $platform_cxxflags | sed 's/-O@<:@123@:>@//g;s/ release_cflags="-DNDEBUG=1" # newer xcode version accept -Og flag, but debugging doesn't work with it -if test "$platform_os" = "osx" || test "$platform_os" = "ios"; then +if test "$platform_os" = "osx" || test "$platform_os" = "darwin_embedded"; then debug_cflags="-g -D_DEBUG" else CFLAGS="$tmp_cflags -Og -g -D_DEBUG" @@ -685,7 +685,7 @@ AC_SUBST(ffmpeg_options) AC_OUTPUT -if test "$platform_os" == "ios"; then +if test "$platform_os" == "darwin_embedded"; then if test "$use_platform" = "tvos"; then simulator_sdk_path=[`$use_xcodebuild -version -sdk appletvsimulator$use_sdk | grep ^Path | awk '{ print $2}'`] else diff --git a/tools/depends/m4/xbmc_arch.m4 b/tools/depends/m4/xbmc_arch.m4 index ce3467114b..36aee1093e 100644 --- a/tools/depends/m4/xbmc_arch.m4 +++ b/tools/depends/m4/xbmc_arch.m4 @@ -46,7 +46,7 @@ case $host in AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_FREEBSD") ;; arm-apple-darwin*) - AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_DARWIN -DTARGET_DARWIN_IOS") + AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_DARWIN -DTARGET_DARWIN_EMBEDDED") ;; *86*-apple-darwin*) AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_DARWIN -DTARGET_DARWIN_OSX") diff --git a/tools/depends/native/Makefile b/tools/depends/native/Makefile index 5324b91eed..7a04699600 100644 --- a/tools/depends/native/Makefile +++ b/tools/depends/native/Makefile @@ -13,7 +13,7 @@ NATIVE= m4 gettext autoconf automake \ flatbuffers -ifeq ($(OS),ios) +ifeq ($(OS),darwin_embedded) NATIVE += dpkg xz tar gen_entitlements ldid endif diff --git a/tools/depends/target/Makefile b/tools/depends/target/Makefile index 0053e67d41..3e9e71c712 100644 --- a/tools/depends/target/Makefile +++ b/tools/depends/target/Makefile @@ -26,7 +26,7 @@ else DEPENDS+=samba libcdio endif -ifeq ($(OS),ios) +ifeq ($(OS),darwin_embedded) EXCLUDED_DEPENDS = libcec libusb ifeq ($(TARGET_PLATFORM),appletvos) DEPENDS += boblight diff --git a/tools/depends/target/Toolchain.cmake.in b/tools/depends/target/Toolchain.cmake.in index f32eae94cf..12004050d6 100644 --- a/tools/depends/target/Toolchain.cmake.in +++ b/tools/depends/target/Toolchain.cmake.in @@ -30,12 +30,13 @@ elseif(OS STREQUAL android) elseif(OS STREQUAL osx) set(CMAKE_SYSTEM_NAME Darwin) set(CORE_SYSTEM_NAME osx) -elseif(OS STREQUAL ios) +elseif(OS STREQUAL darwin_embedded) set(CMAKE_SYSTEM_NAME Darwin) - set(CORE_SYSTEM_NAME ios) + set(CORE_SYSTEM_NAME darwin_embedded) + set(CORE_PLATFORM_NAME ios) endif() -if(CORE_SYSTEM_NAME STREQUAL ios) +if(CORE_SYSTEM_NAME STREQUAL darwin_embedded) # Necessary to build the main Application (but not other dependencies) # with Xcode (and a bundle with Makefiles) (https://cmake.org/Bug/view.php?id=15329) if(NOT PROJECT_SOURCE_DIR MATCHES "tools/depends") @@ -48,7 +49,7 @@ if(CORE_SYSTEM_NAME STREQUAL ios) endif() endif() -if(CORE_SYSTEM_NAME STREQUAL ios OR CORE_SYSTEM_NAME STREQUAL osx) +if(CMAKE_SYSTEM_NAME STREQUAL Darwin) set(CMAKE_OSX_SYSROOT @use_sdk_path@) set(CMAKE_XCODE_ATTRIBUTE_ARCHS ${CPU}) set(CMAKE_XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET 9.0) diff --git a/tools/depends/target/Toolchain_binaddons.cmake.in b/tools/depends/target/Toolchain_binaddons.cmake.in index a889085ecf..a4780ae595 100644 --- a/tools/depends/target/Toolchain_binaddons.cmake.in +++ b/tools/depends/target/Toolchain_binaddons.cmake.in @@ -33,15 +33,16 @@ elseif(OS STREQUAL osx) if(NOT APP_RENDER_SYSTEM) set(APP_RENDER_SYSTEM gl) endif() -elseif(OS STREQUAL ios) +elseif(OS STREQUAL darwin_embedded) set(CMAKE_SYSTEM_NAME Darwin) - set(CORE_SYSTEM_NAME ios) + set(CORE_SYSTEM_NAME darwin_embedded) + set(CORE_PLATFORM_NAME ios) if(NOT APP_RENDER_SYSTEM) set(APP_RENDER_SYSTEM gles) endif() endif() -if(CORE_SYSTEM_NAME STREQUAL ios OR CORE_SYSTEM_NAME STREQUAL osx) +if(CMAKE_SYSTEM_NAME STREQUAL Darwin) set(CMAKE_OSX_SYSROOT @use_sdk_path@) list(APPEND CMAKE_FIND_ROOT_PATH ${CMAKE_OSX_SYSROOT} ${CMAKE_OSX_SYSROOT}/usr /usr/X11R6) set(CMAKE_LIBRARY_PATH @CMAKE_FIND_ROOT_PATH@/lib:@use_sdk_path@/lib:/usr/X11R6/lib) diff --git a/tools/depends/target/boblight/Makefile b/tools/depends/target/boblight/Makefile index e34ffcc21d..e048c2b42e 100644 --- a/tools/depends/target/boblight/Makefile +++ b/tools/depends/target/boblight/Makefile @@ -40,7 +40,7 @@ $(LIBDYLIB): $(PLATFORM) $(MAKE) -C $(PLATFORM) .installed-$(PLATFORM): $(LIBDYLIB) -ifeq ($(OS),ios) +ifeq ($(OS),darwin_embedded) ifeq ($(TARGET_PLATFORM),appletvos) #deploy into source tree for tvos - we distribute libboblight with the bundle... cp $(PLATFORM)/src/.libs/libboblight.0.dylib $(CMAKE_SOURCE_DIR)/system/libboblight-tvos.0.dylib diff --git a/tools/depends/target/config-binaddons.site.in b/tools/depends/target/config-binaddons.site.in index 38c5d20134..3c61910a47 100644 --- a/tools/depends/target/config-binaddons.site.in +++ b/tools/depends/target/config-binaddons.site.in @@ -15,7 +15,7 @@ STRIP="@STRIP@" RANLIB="@RANLIB@" OBJDUMP="@OBJDUMP@" -if test "@platform_os@" = "ios" ; then +if test "@platform_os@" = "darwin_embedded" ; then export AS="@prefix@/@tool_dir@/bin/gas-preprocessor.pl @CC@ -arch @use_cpu@" export CCAS="--tag CC @prefix@/@tool_dir@/bin/gas-preprocessor.pl @CC@ -arch @use_cpu@" fi @@ -70,7 +70,7 @@ ac_cv_file__proc_sys_kernel_core_pattern=no samba_cv_SYSCONF_SC_NPROCESSORS_ONLN=no libreplace_cv_HAVE_GETADDRINFO=no -if test "${PACKAGE_NAME}" = "Samba" -a "@platform_os@" = "ios"; then +if test "${PACKAGE_NAME}" = "Samba" -a "@platform_os@" = "darwin_embedded"; then # disable python support export PYTHON_VER=0.0 # ios/osx-10.6 issue with collision of _MD5 exported from a system lib @@ -125,7 +125,7 @@ if test "@platform_os@" = "osx" ; then fi -if test "@platform_os@" = "ios"; then +if test "@platform_os@" = "darwin_embedded"; then # Xcode 8 + 10.11, clock_gettime getentropy is present # in 10.12 but will get wrongly detected if building on 10.11 ac_cv_search_clock_gettime=no diff --git a/tools/depends/target/config.site.in b/tools/depends/target/config.site.in index 36bf2fced2..64c07369e4 100644 --- a/tools/depends/target/config.site.in +++ b/tools/depends/target/config.site.in @@ -15,7 +15,7 @@ STRIP="@STRIP@" RANLIB="@RANLIB@" OBJDUMP="@OBJDUMP@" -if test "@platform_os@" = "ios" ; then +if test "@platform_os@" = "darwin_embedded" ; then export AS="@prefix@/@tool_dir@/bin/gas-preprocessor.pl @CCACHE@ @CC@ -arch @use_cpu@" export CCAS="--tag CC @prefix@/@tool_dir@/bin/gas-preprocessor.pl @CCACHE@ @CC@ -arch @use_cpu@" fi @@ -82,7 +82,7 @@ ac_cv_file__proc_sys_kernel_core_pattern=no samba_cv_SYSCONF_SC_NPROCESSORS_ONLN=no libreplace_cv_HAVE_GETADDRINFO=no -if test "${PACKAGE_NAME}" = "Samba" -a "@platform_os@" = "ios"; then +if test "${PACKAGE_NAME}" = "Samba" -a "@platform_os@" = "darwin_embedded"; then # disable python support export PYTHON_VER=0.0 if test "@use_cpu@" != "arm64"; then @@ -146,7 +146,7 @@ if test "@platform_os@" = "osx" ; then fi -if test "@platform_os@" = "ios"; then +if test "@platform_os@" = "darwin_embedded"; then # Xcode 8 + 10.11, clock_gettime and getentropy is present # in 10.12 but will get wrongly detected if building on 10.11 ac_cv_search_clock_gettime=no diff --git a/tools/depends/target/crossguid/Makefile b/tools/depends/target/crossguid/Makefile index bb676f546c..3936f651e1 100644 --- a/tools/depends/target/crossguid/Makefile +++ b/tools/depends/target/crossguid/Makefile @@ -30,7 +30,7 @@ GUID_PLATFORM_DEFINE=GUID_LIBUUID ifeq ($(OS),osx) GUID_PLATFORM_DEFINE=GUID_CFUUID endif -ifeq ($(OS),ios) +ifeq ($(OS),darwin_embedded) GUID_PLATFORM_DEFINE=GUID_CFUUID endif diff --git a/tools/depends/target/ffmpeg/CMakeLists.txt b/tools/depends/target/ffmpeg/CMakeLists.txt index 4a2622216c..5ee90c4b79 100644 --- a/tools/depends/target/ffmpeg/CMakeLists.txt +++ b/tools/depends/target/ffmpeg/CMakeLists.txt @@ -63,7 +63,7 @@ elseif(CORE_SYSTEM_NAME STREQUAL android) list(APPEND ffmpeg_conf --cpu=i686 --disable-mmx) endif() list(APPEND ffmpeg_conf --target-os=linux --extra-libs=-liconv --disable-linux-perf) -elseif(CORE_SYSTEM_NAME STREQUAL ios) +elseif(CORE_SYSTEM_NAME STREQUAL darwin_embedded) if(NOT CPU MATCHES arm64) list(APPEND ffmpeg_conf --cpu=cortex-a8) else() diff --git a/tools/depends/target/ffmpeg/Makefile b/tools/depends/target/ffmpeg/Makefile index c42e67e7da..731109ff24 100644 --- a/tools/depends/target/ffmpeg/Makefile +++ b/tools/depends/target/ffmpeg/Makefile @@ -43,7 +43,7 @@ ifeq ($(OS), android) endif ffmpg_config += --target-os=linux --extra-libs=-liconv --disable-linux-perf endif -ifeq ($(OS), ios) +ifeq ($(OS), darwin_embedded) ifneq ($(CPU), arm64) ffmpg_config += --cpu=cortex-a8 ffmpg_config += --as="$(NATIVEPREFIX)/bin/gas-preprocessor.pl -- $(CC)" @@ -81,7 +81,7 @@ $(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS) cd $(PLATFORM);\ CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" \ ./configure $(ffmpg_config) -ifeq ($(OS), ios) +ifeq ($(OS), darwin_embedded) cd $(PLATFORM); sed -i -- 's/HAVE_CLOCK_GETTIME 1/HAVE_CLOCK_GETTIME 0/g' config.h endif diff --git a/tools/depends/target/gmp/Makefile b/tools/depends/target/gmp/Makefile index cf14bccec6..1bc119f71e 100644 --- a/tools/depends/target/gmp/Makefile +++ b/tools/depends/target/gmp/Makefile @@ -18,7 +18,7 @@ ifeq ($(OS),linux) endif endif -ifeq ($(OS),ios) +ifeq ($(OS),darwin_embedded) CONFIGURE_FLAGS=--disable-assembly endif ifeq ($(OS),osx) diff --git a/tools/depends/target/libdvdnav/Makefile b/tools/depends/target/libdvdnav/Makefile index fab216472c..eada58a160 100644 --- a/tools/depends/target/libdvdnav/Makefile +++ b/tools/depends/target/libdvdnav/Makefile @@ -25,7 +25,7 @@ endif ifeq ($(OS),osx) EXTRA_CFLAGS += -D__DARWIN__ endif -ifeq ($(OS),ios) +ifeq ($(OS),darwin_embedded) EXTRA_CFLAGS += -D__DARWIN__ endif diff --git a/tools/depends/target/libdvdread/Makefile b/tools/depends/target/libdvdread/Makefile index e9fd9b10a4..d240953fe4 100644 --- a/tools/depends/target/libdvdread/Makefile +++ b/tools/depends/target/libdvdread/Makefile @@ -24,7 +24,7 @@ endif ifeq ($(OS),osx) EXTRA_CFLAGS += -D__DARWIN__ endif -ifeq ($(OS),ios) +ifeq ($(OS),darwin_embedded) EXTRA_CFLAGS += -D__DARWIN__ endif diff --git a/tools/depends/target/libgpg-error/Makefile b/tools/depends/target/libgpg-error/Makefile index b4c0714af3..d0c108cd1b 100644 --- a/tools/depends/target/libgpg-error/Makefile +++ b/tools/depends/target/libgpg-error/Makefile @@ -25,7 +25,7 @@ $(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS) cd $(PLATFORM); $(CONFIGURE) $(LIBDYLIB): $(PLATFORM) -ifeq ($(OS),ios) +ifeq ($(OS),darwin_embedded) ifeq ($(CPU),arm64) cp $(PLATFORM)/src/syscfg/lock-obj-pub.aarch64-apple-darwin.h $(PLATFORM)/src/syscfg/lock-obj-pub.arm-apple-darwin.h endif diff --git a/tools/depends/target/nettle/Makefile b/tools/depends/target/nettle/Makefile index a559b1c33d..4d2f43427d 100644 --- a/tools/depends/target/nettle/Makefile +++ b/tools/depends/target/nettle/Makefile @@ -7,7 +7,7 @@ VERSION=3.2 SOURCE=$(LIBNAME)-$(VERSION) ARCHIVE=$(SOURCE).tar.gz -ifeq ($(OS),ios) +ifeq ($(OS),darwin_embedded) CONFIGURE_FLAGS=-disable-assembler endif diff --git a/tools/depends/target/openssl/Makefile b/tools/depends/target/openssl/Makefile index cabe8f03d3..70929763e7 100644 --- a/tools/depends/target/openssl/Makefile +++ b/tools/depends/target/openssl/Makefile @@ -12,7 +12,7 @@ CONFIGURE=MACHINE=$(PLATFORM) ./config no-shared zlib no-asm --prefix=$(PREFIX) ifeq ($(OS), android) CONFIGURE=./Configure no-shared zlib --prefix=$(PREFIX) --with-zlib-include=$(PREFIX)/include --with-zlib-lib=$(PREFIX)/lib linux-generic32 -D__ANDROID_API__=$(NDK_LEVEL) endif -ifeq ($(OS), ios) +ifeq ($(OS), darwin_embedded) ifeq ($(TARGET_PLATFORM),appletvos) # Need to add "no-async" to avoid "'setcontext' is unavailable: not available on tvOS" error CONFIGURE=./Configure iphoneos-cross no-shared zlib no-asm no-async --prefix=$(PREFIX) @@ -44,7 +44,7 @@ $(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS) fi # for iphoneos-cross config a sysroot argument is added # however sysroot already set in Makefile.include, so remove this - if test "$(OS)" = "ios"; then \ + if test "$(OS)" = "darwin_embedded"; then \ sed -E -ie "s|^CFLAGS=-|CFLAGS=$(CFLAGS) -|" "$(PLATFORM)/Makefile"; \ sed -ie "s|-isysroot \$$(CROSS_TOP)/SDKs/\$$(CROSS_SDK) ||" "$(PLATFORM)/Makefile"; \ sed -ie "s|static volatile sig_atomic_t intr_signal;|static volatile intr_signal;|" "$(PLATFORM)/crypto/ui/ui_openssl.c"; \ diff --git a/tools/depends/target/python27/Makefile b/tools/depends/target/python27/Makefile index b38fc0dc14..4fc2446479 100644 --- a/tools/depends/target/python27/Makefile +++ b/tools/depends/target/python27/Makefile @@ -11,7 +11,7 @@ ARCHIVE=$(SOURCE).tar.xz ifeq ($(OS),osx) HOSTPLATFORM=_PYTHON_HOST_PLATFORM="darwin" endif -ifeq ($(OS),ios) +ifeq ($(OS),darwin_embedded) HOSTPLATFORM=_PYTHON_HOST_PLATFORM="darwin" LINK_ICONV=-framework CoreFoundation -liconv endif @@ -42,7 +42,7 @@ $(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS) cd $(PLATFORM); patch -p1 -i ../android-binmodule.patch cd $(PLATFORM); patch -p1 -i ../no-abort.patch cd $(PLATFORM); patch -p1 -i ../android-nl_langinfo.patch -ifeq ($(OS),ios) +ifeq ($(OS),darwin_embedded) cd $(PLATFORM); patch -p1 -i ../make-fork-optional.patch cd $(PLATFORM); patch -p1 -i ../urllib.patch cd $(PLATFORM); sed -ie 's|MACHDEP="unknown"|MACHDEP="darwin"|' configure.ac diff --git a/tools/depends/target/pythonmodule-pil/Makefile b/tools/depends/target/pythonmodule-pil/Makefile index 10ce087185..96ed12d50e 100644 --- a/tools/depends/target/pythonmodule-pil/Makefile +++ b/tools/depends/target/pythonmodule-pil/Makefile @@ -17,7 +17,7 @@ CROSSFLAGS=PYTHONXCPREFIX="$(PREFIX)" CC="$(CC) $(CFLAGS)" LDSHARED="$(CC) -shar endif ifeq (darwin, $(findstring darwin, $(HOST))) -ifeq ($(OS),ios) +ifeq ($(OS),darwin_embedded) PYTHON_O=$(abs_top_srcdir)/target/python27/$(PLATFORM)/Modules/python.o endif #ensure that only our target ldflags are passed to the python build diff --git a/tools/depends/target/pythonmodule-pycryptodome/Makefile b/tools/depends/target/pythonmodule-pycryptodome/Makefile index 583b2d92f9..9f2c0f59ec 100644 --- a/tools/depends/target/pythonmodule-pycryptodome/Makefile +++ b/tools/depends/target/pythonmodule-pycryptodome/Makefile @@ -16,7 +16,7 @@ CROSSFLAGS=PYTHONXCPREFIX="$(PREFIX)" CC="$(CC) $(CFLAGS)" LDSHARED="$(CC) -shar endif ifeq (darwin, $(findstring darwin, $(HOST))) -ifeq ($(OS),ios) +ifeq ($(OS),darwin_embedded) PYTHON_O=$(abs_top_srcdir)/target/python27/$(PLATFORM)/Modules/python.o endif #ensure that only our target ldflags are passed to the python build diff --git a/tools/depends/target/pythonmodule-setuptools/Makefile b/tools/depends/target/pythonmodule-setuptools/Makefile index 69dba4c7b9..f498f57611 100644 --- a/tools/depends/target/pythonmodule-setuptools/Makefile +++ b/tools/depends/target/pythonmodule-setuptools/Makefile @@ -18,7 +18,7 @@ endif ifeq ($(OS),osx) CROSSFLAGS=PYTHONXCPREFIX="$(PREFIX)" CC="$(CC)" LDSHARED="$(CC) -shared" LDFLAGS="$(LDFLAGS) -lpython" PYTHONPATH="$(PREFIX)/lib/python2.7/site-packages/" endif -ifeq ($(OS),ios) +ifeq ($(OS),darwin_embedded) PYTHON_O=$(abs_top_srcdir)/target/python27/$(PLATFORM)/Modules/python.o CROSSFLAGS=PYTHONXCPREFIX="$(PREFIX)" CC="$(CC) $(CFLAGS)" CCSHARED="$(CC) $(CFLAGS) $(PYTHON_O)" LDFLAGS="$(LDFLAGS)" PYTHONPATH="$(PREFIX)/lib/python2.7/site-packages/" endif diff --git a/tools/depends/target/samba-gplv3/Makefile b/tools/depends/target/samba-gplv3/Makefile index 88625c214f..d4a1dbe6ca 100644 --- a/tools/depends/target/samba-gplv3/Makefile +++ b/tools/depends/target/samba-gplv3/Makefile @@ -7,7 +7,7 @@ VERSION=4.1.23 SOURCE=$(LIBNAME)-$(VERSION) ARCHIVE=$(SOURCE).tar.gz -ifeq ($(OS), ios) +ifeq ($(OS), darwin_embedded) ifeq ($(CPU), arm64) # clang issue with optimizing out functions CONFIGURE_EXTRAS= --without-libmsrpc samba_cv_optimize_out_funcation_calls=no ac_cv_func_yp_get_default_domain=no @@ -53,7 +53,7 @@ ifeq ($(OS),android) cd $(PLATFORM); patch -p1 -i ../samba_android.patch cd $(PLATFORM); patch -p1 -i ../samba_off64_t.patch endif -ifeq ($(OS), ios) +ifeq ($(OS), darwin_embedded) cd $(PLATFORM); patch -p1 -i ../no_fork_and_exec.patch cd $(PLATFORM); patch -p1 -i ../crt_extensions.patch endif diff --git a/xbmc/cores/AudioEngine/CMakeLists.txt b/xbmc/cores/AudioEngine/CMakeLists.txt index c3b6f0e9c5..5c60ec00ca 100644 --- a/xbmc/cores/AudioEngine/CMakeLists.txt +++ b/xbmc/cores/AudioEngine/CMakeLists.txt @@ -118,7 +118,7 @@ if(CORE_SYSTEM_NAME STREQUAL osx) Sinks/osx/CoreAudioStream.h) endif() -if(CORE_SYSTEM_NAME STREQUAL ios) +if(CORE_SYSTEM_NAME STREQUAL darwin_embedded) list(APPEND SOURCES Sinks/AESinkDARWINIOS.mm Sinks/darwin/CoreAudioHelpers.cpp) list(APPEND HEADERS Sinks/AESinkDARWINIOS.h diff --git a/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/CMakeLists.txt b/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/CMakeLists.txt index 0f5bc0c18f..6184affccf 100644 --- a/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/CMakeLists.txt +++ b/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/CMakeLists.txt @@ -27,7 +27,7 @@ if(CORE_SYSTEM_NAME STREQUAL osx) list(APPEND HEADERS RendererVTBGL.h) endif() -if(CORE_SYSTEM_NAME STREQUAL ios) +if(CORE_SYSTEM_NAME STREQUAL darwin_embedded) list(APPEND SOURCES RendererVTBGLES.cpp) list(APPEND HEADERS RendererVTBGLES.h) endif() |