view buildSrc/ios.gradle @ 11208:db2c977a840b

8220147: Cherry pick GTK WebKit 2.22.7 changes Reviewed-by: mbilla, kcr
author arajkumar
date Fri, 08 Mar 2019 14:03:47 +0530
parents 1c9c3ac09110
children 4d10485201c7
line wrap: on
line source
/*
 * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * This code is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License version 2 only, as
 * published by the Free Software Foundation.  Oracle designates this
 * particular file as subject to the "Classpath" exception as provided
 * by Oracle in the LICENSE file that accompanied this code.
 *
 * This code is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 * version 2 for more details (a copy is included in the LICENSE file that
 * accompanied this code).
 *
 * You should have received a copy of the GNU General Public License version
 * 2 along with this work; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 *
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 * or visit www.oracle.com if you need additional information or have any
 * questions.
 */

ext.IOS = [:]

if (BUILD_CLOSED) {
    fetchExternalTools('IOS',
      ["ios-libs-08.tgz"],
      rootProject.CROSS_TOOLS_DIR, rootProject.IS_IMPORT_CROSS_TOOLS)
}

// TODO Check for presence of iOS tools
IOS.canBuild = IS_MAC
if (!IOS.canBuild) return;

IOS.compileSwing = false;
IOS.compileSWT = false;

defineProperty("USE_LIPO", "false")
IOS.useLipo = Boolean.parseBoolean(USE_LIPO)

defineProperty("GENERATE_SYMBOLS", "false")
IOS.generateSymbols = Boolean.parseBoolean(GENERATE_SYMBOLS)

defineProperty("BUILD_IOS_TOOLS", "true")
ext.IS_BUILD_IOS_TOOLS = Boolean.parseBoolean(BUILD_IOS_TOOLS)

IOS.generateSymbolsExcludes = [
    "libprism_sw.a",
    "libdecora_sse_armv7.a"
]

defineProperty("IOS_VERSION", "7.0")

// Lambda for naming the generated libs
IOS.library = { name -> return "lib${name}.a" as String }

IOS.libDest = "lib"

IOS.jfxrtJarExcludes = [
    "**/*.hlsl",
    "com/sun/glass/ui/win",
    "com/sun/prism/d3d",
    "com/sun/prism/es2/gl/win",
    "com/sun/prism/null3d",
    "com/sun/scenario/effect/impl/hw/d3d",

    "com/sun/glass/events/mac",
    "com/sun/glass/ui/mac",
    "com/sun/prism/es2/gl/mac",
    "com/sun/glass/ui/android",
    "com/sun/glass/ui/gtk",

    "com/sun/glass/ui/lens",
    "com/sun/prism/es2/gl/eglfb",
    "com/sun/prism/es2/gl/eglx11",
    "com/sun/prism/es2/gl/x11",

    "com/sun/glass/ui/swt", // SWT glass

    "javafx/embed/swing", // Swing Interop

    "javafx/embed/swt", // SWT Interop
]

def archArm = "armv7"
def archArm64 = "arm64"
def archX86 = "i386"
def archX86_64 = "x86_64"
def iPhoneOS = "iPhoneOS"
def iPhoneSim = "iPhoneSimulator"

String sdkPath(String platform) {
    return "/Applications/Xcode.app/Contents/Developer/Platforms/${platform}.platform/Developer/SDKs/${platform}${IOS_VERSION}.sdk";
}

def linkFlags = [
    "-static",
    "-framework", "Foundation",
    "-framework", "CoreGraphics",
    "-framework", "CoreText",
    "-framework", "UIKit",
    "-framework", "QuartzCore",
    "-framework", "OpenGLES"].flatten()

def ccFlags = [
    "-miphoneos-version-min=6.0", "-fmessage-length=0", "-std=c99", "-fno-common",
    "-Wall", "-fno-strict-aliasing", "-fwrapv", "-fpascal-strings", "-fobjc-abi-version=2", "-fobjc-legacy-dispatch",
    "-I$JDK_HOME/include", "-I$JDK_HOME/include/darwin", "-c",
    IS_DEBUG_NATIVE ? ["-O0", "-DDEBUG", "-g"] : ["-O3", "-DNDEBUG"]].flatten()

def compiler = "clang"
def linker = "libtool"

IOS.javafxPlatformProperties ="""javafx.platform=ios
ios.javax.xml.stream.XMLInputFactory=com.sun.xml.stream.ZephyrParserFactory
ios.javax.xml.stream.XMLOutputFactory=com.sun.xml.stream.ZephyrWriterFactory
ios.javax.xml.stream.XMLEventFactory=com.sun.xml.stream.events.ZephyrEventFactory
ios.jfxmedia.platforms=IOSPlatform
ios.glass.platform=ios
ios.prism.allowhidpi=true
ios.prism.mintexturesize=16
ios.prism.verbose=true
ios.prism.static.libraries=true
ios.prism.useNativeIIO=false"""

IOS.glass = [:]
IOS.glass.variants = ["arm", "arm64", "x86", "x86_64"];
IOS.glass.javahInclude = [
    "com/sun/glass/events/**",
    "com/sun/glass/ui/*",
    "com/sun/glass/ui/ios/*"]
IOS.glass.lib = "glass"

IOS.glass.arm = [:]
IOS.glass.arm.nativeSource = file("${project("graphics").projectDir}/src/main/native-glass/ios")
IOS.glass.arm.compiler = compiler
IOS.glass.arm.ccFlags = ["-x", "objective-c", ccFlags, "-arch", archArm, "-isysroot", sdkPath(iPhoneOS)].flatten()
IOS.glass.arm.linker = linker
IOS.glass.arm.linkFlags = ["-arch_only", archArm, "-syslibroot", sdkPath(iPhoneOS), linkFlags, "-L${sdkPath(iPhoneOS)}/usr/lib"].flatten()
IOS.glass.arm.lib = "glass_${archArm}"

IOS.glass.arm64 = [:]
IOS.glass.arm64.nativeSource = file("${project("graphics").projectDir}/src/main/native-glass/ios")
IOS.glass.arm64.compiler = compiler
IOS.glass.arm64.ccFlags = ["-x", "objective-c", ccFlags, "-arch", archArm64, "-isysroot", sdkPath(iPhoneOS)].flatten()
IOS.glass.arm64.linker = linker
IOS.glass.arm64.linkFlags = ["-arch_only", archArm64, "-syslibroot", sdkPath(iPhoneOS), linkFlags, "-L${sdkPath(iPhoneOS)}/usr/lib"].flatten()
IOS.glass.arm64.lib = "glass_${archArm64}"

IOS.glass.x86 = [:]
IOS.glass.x86.nativeSource = file("${project("graphics").projectDir}/src/main/native-glass/ios")
IOS.glass.x86.compiler = compiler
IOS.glass.x86.ccFlags = ["-x", "objective-c", ccFlags, "-arch", archX86, "-isysroot", sdkPath(iPhoneSim)].flatten()
IOS.glass.x86.linker = linker
IOS.glass.x86.linkFlags = ["-arch_only", archX86, "-syslibroot", sdkPath(iPhoneSim), linkFlags, "-L${sdkPath(iPhoneSim)}/usr/lib"].flatten()
IOS.glass.x86.lib = "glass_${archX86}"

IOS.glass.x86_64 = [:]
IOS.glass.x86_64.nativeSource = file("${project("graphics").projectDir}/src/main/native-glass/ios")
IOS.glass.x86_64.compiler = compiler
IOS.glass.x86_64.ccFlags = ["-x", "objective-c", ccFlags, "-arch", archX86_64, "-isysroot", sdkPath(iPhoneSim)].flatten()
IOS.glass.x86_64.linker = linker
IOS.glass.x86_64.linkFlags = ["-arch_only", archX86_64, "-syslibroot", sdkPath(iPhoneSim), linkFlags, "-L${sdkPath(iPhoneSim)}/usr/lib"].flatten()
IOS.glass.x86_64.lib = "glass_${archX86_64}"

IOS.extensions = [:]
IOS.extensions.variants = ["arm", "arm64", "x86", "x86_64"];
IOS.extensions.javahSource = files("${project("extensions").buildDir}/classes/ios")
IOS.extensions.javahClasspath = files("${project("extensions").buildDir}/classes/ios/")
IOS.extensions.javahInclude = ["com/sun/javafx/ext/device/ios/**/*"]
IOS.extensions.lib = "extensions_ios"

IOS.extensions.arm = [:]
IOS.extensions.arm.nativeSource = file("${project("extensions").projectDir}/src/ios/native-device/ios")
IOS.extensions.arm.compiler = compiler
IOS.extensions.arm.ccFlags = ["-x", "objective-c", ccFlags, "-arch", archArm, "-isysroot", sdkPath(iPhoneOS)].flatten()
IOS.extensions.arm.linker = linker
IOS.extensions.arm.linkFlags = ["-arch_only", archArm, "-syslibroot", sdkPath(iPhoneOS), linkFlags, "-L${sdkPath(iPhoneOS)}/usr/lib"].flatten()
IOS.extensions.arm.lib = "extensions_ios_${archArm}"

IOS.extensions.arm64 = [:]
IOS.extensions.arm64.nativeSource = file("${project("extensions").projectDir}/src/ios/native-device/ios")
IOS.extensions.arm64.compiler = compiler
IOS.extensions.arm64.ccFlags = ["-x", "objective-c", ccFlags, "-arch", archArm64, "-isysroot", sdkPath(iPhoneOS)].flatten()
IOS.extensions.arm64.linker = linker
IOS.extensions.arm64.linkFlags = ["-arch_only", archArm64, "-syslibroot", sdkPath(iPhoneOS), linkFlags, "-L${sdkPath(iPhoneOS)}/usr/lib"].flatten()
IOS.extensions.arm64.lib = "extensions_ios_${archArm64}"

IOS.extensions.x86 = [:]
IOS.extensions.x86.nativeSource = file("${project("extensions").projectDir}/src/ios/native-device/ios")
IOS.extensions.x86.compiler = compiler
IOS.extensions.x86.ccFlags = ["-x", "objective-c", ccFlags, "-arch", archX86, "-isysroot", sdkPath(iPhoneSim)].flatten()
IOS.extensions.x86.linker = linker
IOS.extensions.x86.linkFlags = ["-arch_only", archX86, "-syslibroot", sdkPath(iPhoneSim), linkFlags, "-L${sdkPath(iPhoneSim)}/usr/lib"].flatten()
IOS.extensions.x86.lib = "extensions_ios_${archX86}"

IOS.extensions.x86_64 = [:]
IOS.extensions.x86_64.nativeSource = file("${project("extensions").projectDir}/src/ios/native-device/ios")
IOS.extensions.x86_64.compiler = compiler
IOS.extensions.x86_64.ccFlags = ["-x", "objective-c", ccFlags, "-arch", archX86_64, "-isysroot", sdkPath(iPhoneSim)].flatten()
IOS.extensions.x86_64.linker = linker
IOS.extensions.x86_64.linkFlags = ["-arch_only", archX86_64, "-syslibroot", sdkPath(iPhoneSim), linkFlags, "-L${sdkPath(iPhoneSim)}/usr/lib"].flatten()
IOS.extensions.x86_64.lib = "extensions_ios_${archX86_64}"

IOS.decora = [:]
IOS.decora.variants = ["arm", "arm64"];
IOS.decora.lib = "decora_sse"

IOS.decora.arm = [:]
IOS.decora.arm.compiler = compiler
IOS.decora.arm.ccFlags = [ccFlags, "-arch", archArm, "-isysroot", sdkPath(iPhoneOS), "-ffast-math"].flatten()
IOS.decora.arm.linker = linker
IOS.decora.arm.linkFlags = ["-arch_only", archArm, "-syslibroot", sdkPath(iPhoneOS), linkFlags].flatten()
IOS.decora.arm.lib = "decora_sse_${archArm}"

IOS.decora.arm64 = [:]
IOS.decora.arm64.compiler = compiler
IOS.decora.arm64.ccFlags = [ccFlags, "-arch", archArm64, "-isysroot", sdkPath(iPhoneOS), "-ffast-math"].flatten()
IOS.decora.arm64.linker = linker
IOS.decora.arm64.linkFlags = ["-arch_only", archArm64, "-syslibroot", sdkPath(iPhoneOS), linkFlags].flatten()
IOS.decora.arm64.lib = "decora_sse_${archArm64}"

IOS.prism = [:]
IOS.prism.lib = "prism_common"
IOS.prism.javahInclude = ["com/sun/prism/impl/**/*", "com/sun/prism/PresentableState*"]
IOS.prism.variants = ["arm", "arm64", "x86", "x86_64"];

IOS.prism.arm = [:]
IOS.prism.arm.nativeSource = file("${project("graphics").projectDir}/src/main/native-prism")
IOS.prism.arm.compiler = compiler
IOS.prism.arm.ccFlags = [ccFlags, "-arch", archArm, "-isysroot", sdkPath(iPhoneOS), "-DINLINE=inline"].flatten()
IOS.prism.arm.linker = linker
IOS.prism.arm.linkFlags = ["-arch_only", archArm, "-syslibroot", sdkPath(iPhoneOS), linkFlags].flatten()
IOS.prism.arm.lib = "prism_common_${archArm}"

IOS.prism.arm64 = [:]
IOS.prism.arm64.nativeSource = file("${project("graphics").projectDir}/src/main/native-prism")
IOS.prism.arm64.compiler = compiler
IOS.prism.arm64.ccFlags = [ccFlags, "-arch", archArm64, "-isysroot", sdkPath(iPhoneOS), "-DINLINE=inline"].flatten()
IOS.prism.arm64.linker = linker
IOS.prism.arm64.linkFlags = ["-arch_only", archArm64, "-syslibroot", sdkPath(iPhoneOS), linkFlags].flatten()
IOS.prism.arm64.lib = "prism_common_${archArm64}"

IOS.prism.x86 = [:]
IOS.prism.x86.nativeSource = file("${project("graphics").projectDir}/src/main/native-prism")
IOS.prism.x86.compiler = compiler
IOS.prism.x86.ccFlags = [ccFlags, "-arch", archX86, "-isysroot", sdkPath(iPhoneSim), "-DINLINE=inline"].flatten()
IOS.prism.x86.linker = linker
IOS.prism.x86.linkFlags = ["-arch_only", archX86, "-syslibroot", sdkPath(iPhoneSim), linkFlags].flatten()
IOS.prism.x86.lib = "prism_common_${archX86}"

IOS.prism.x86_64 = [:]
IOS.prism.x86_64.nativeSource = file("${project("graphics").projectDir}/src/main/native-prism")
IOS.prism.x86_64.compiler = compiler
IOS.prism.x86_64.ccFlags = [ccFlags, "-arch", archX86_64, "-isysroot", sdkPath(iPhoneSim), "-DINLINE=inline"].flatten()
IOS.prism.x86_64.linker = linker
IOS.prism.x86_64.linkFlags = ["-arch_only", archX86_64, "-syslibroot", sdkPath(iPhoneSim), linkFlags].flatten()
IOS.prism.x86_64.lib = "prism_common_${archX86_64}"

IOS.prismSW = [:]
IOS.prismSW.lib = "prism_sw"
IOS.prismSW.javahInclude = ["com/sun/pisces/**/*"]
IOS.prismSW.variants = ["arm", "arm64", "x86", "x86_64"];

IOS.prismSW.arm = [:]
IOS.prismSW.arm.nativeSource = file("${project("graphics").projectDir}/src/main/native-prism-sw")
IOS.prismSW.arm.compiler = compiler
IOS.prismSW.arm.ccFlags = [IOS.prism.arm.ccFlags].flatten()
IOS.prismSW.arm.linker = linker
IOS.prismSW.arm.linkFlags = [IOS.prism.arm.linkFlags].flatten()
IOS.prismSW.arm.lib = "prism_sw_${archArm}"

IOS.prismSW.arm64 = [:]
IOS.prismSW.arm64.nativeSource = file("${project("graphics").projectDir}/src/main/native-prism-sw")
IOS.prismSW.arm64.compiler = compiler
IOS.prismSW.arm64.ccFlags = [IOS.prism.arm64.ccFlags].flatten()
IOS.prismSW.arm64.linker = linker
IOS.prismSW.arm64.linkFlags = [IOS.prism.arm64.linkFlags].flatten()
IOS.prismSW.arm64.lib = "prism_sw_${archArm64}"

IOS.prismSW.x86 = [:]
IOS.prismSW.x86.nativeSource = file("${project("graphics").projectDir}/src/main/native-prism-sw")
IOS.prismSW.x86.compiler = compiler
IOS.prismSW.x86.ccFlags = [IOS.prism.x86.ccFlags].flatten()
IOS.prismSW.x86.linker = linker
IOS.prismSW.x86.linkFlags = [IOS.prism.x86.linkFlags].flatten()
IOS.prismSW.x86.lib = "prism_sw_${archX86}"

IOS.prismSW.x86_64 = [:]
IOS.prismSW.x86_64.nativeSource = file("${project("graphics").projectDir}/src/main/native-prism-sw")
IOS.prismSW.x86_64.compiler = compiler
IOS.prismSW.x86_64.ccFlags = [IOS.prism.x86_64.ccFlags].flatten()
IOS.prismSW.x86_64.linker = linker
IOS.prismSW.x86_64.linkFlags = [IOS.prism.x86_64.linkFlags].flatten()
IOS.prismSW.x86_64.lib = "prism_sw_${archX86_64}"

IOS.iio = [:]
IOS.iio.lib = "javafx_iio"
IOS.iio.javahInclude = ["com/sun/javafx/iio/**/*"]
IOS.iio.variants = ["arm", "arm64", "x86", "x86_64"];

IOS.iio.arm = [:]
IOS.iio.arm.nativeSource = [
    file("${project("graphics").projectDir}/src/main/native-iio"),
    file("${project("graphics").projectDir}/src/main/native-iio/ios"),
    file("${project("graphics").projectDir}/src/main/native-iio/libjpeg")]
IOS.iio.arm.compiler = compiler
IOS.iio.arm.ccFlags = ["-x", "objective-c", ccFlags, "-arch", archArm, "-isysroot", sdkPath(iPhoneOS), "-ffast-math"].flatten()
IOS.iio.arm.linker = linker
IOS.iio.arm.linkFlags = ["-arch_only", archArm, "-syslibroot", sdkPath(iPhoneOS), linkFlags].flatten()
IOS.iio.arm.lib = "javafx_iio_${archArm}"

IOS.iio.arm64 = [:]
IOS.iio.arm64.nativeSource = [IOS.iio.arm.nativeSource].flatten()
IOS.iio.arm64.compiler = compiler
IOS.iio.arm64.ccFlags = ["-x", "objective-c", ccFlags, "-arch", archArm64, "-isysroot", sdkPath(iPhoneOS), "-ffast-math"].flatten()
IOS.iio.arm64.linker = linker
IOS.iio.arm64.linkFlags = ["-arch_only", archArm64, "-syslibroot", sdkPath(iPhoneOS), linkFlags].flatten()
IOS.iio.arm64.lib = "javafx_iio_${archArm64}"

IOS.iio.x86 = [:]
IOS.iio.x86.nativeSource = [IOS.iio.arm.nativeSource].flatten()
IOS.iio.x86.compiler = compiler
IOS.iio.x86.ccFlags = ["-x", "objective-c", ccFlags, "-arch", archX86, "-isysroot", sdkPath(iPhoneSim), "-ffast-math"].flatten()
IOS.iio.x86.linker = linker
IOS.iio.x86.linkFlags = ["-arch_only", archX86, "-syslibroot", sdkPath(iPhoneSim), linkFlags].flatten()
IOS.iio.x86.lib = "javafx_iio_${archX86}"

IOS.iio.x86_64 = [:]
IOS.iio.x86_64.nativeSource = [IOS.iio.arm.nativeSource].flatten()
IOS.iio.x86_64.compiler = compiler
IOS.iio.x86_64.ccFlags = ["-x", "objective-c", ccFlags, "-arch", archX86_64, "-isysroot", sdkPath(iPhoneSim), "-ffast-math"].flatten()
IOS.iio.x86_64.linker = linker
IOS.iio.x86_64.linkFlags = ["-arch_only", archX86_64, "-syslibroot", sdkPath(iPhoneSim), linkFlags].flatten()
IOS.iio.x86_64.lib = "javafx_iio_${archX86_64}"

IOS.prismES2 = [:]
IOS.prismES2.lib = "prism_es2"
IOS.prismES2.javahInclude = ["com/sun/prism/es2/**/*"]
IOS.prismES2.variants = ["arm", "arm64", "x86", "x86_64"];

IOS.prismES2.arm = [:]
IOS.prismES2.arm.nativeSource = [
    file("${project("graphics").projectDir}/src/main/native-prism-es2"),
    file("${project("graphics").projectDir}/src/main/native-prism-es2/GL"),
    file("${project("graphics").projectDir}/src/main/native-prism-es2/ios")
]
IOS.prismES2.arm.compiler = compiler
IOS.prismES2.arm.ccFlags = ["-x", "objective-c", ccFlags, "-arch", archArm, "-isysroot", sdkPath(iPhoneOS)].flatten()
IOS.prismES2.arm.linker = linker
IOS.prismES2.arm.linkFlags = ["-arch_only", archArm, "-syslibroot", sdkPath(iPhoneOS), linkFlags].flatten()
IOS.prismES2.arm.lib = "prism_es2_${archArm}"

IOS.prismES2.arm64 = [:]
IOS.prismES2.arm64.nativeSource = [IOS.prismES2.arm.nativeSource].flatten()
IOS.prismES2.arm64.compiler = compiler
IOS.prismES2.arm64.ccFlags = ["-x", "objective-c", ccFlags, "-arch", archArm64, "-isysroot", sdkPath(iPhoneOS)].flatten()
IOS.prismES2.arm64.linker = linker
IOS.prismES2.arm64.linkFlags = ["-arch_only", archArm64, "-syslibroot", sdkPath(iPhoneOS), linkFlags].flatten()
IOS.prismES2.arm64.lib = "prism_es2_${archArm64}"

IOS.prismES2.x86 = [:]
IOS.prismES2.x86.nativeSource = [IOS.prismES2.arm.nativeSource].flatten()
IOS.prismES2.x86.compiler = compiler
IOS.prismES2.x86.ccFlags = ["-x", "objective-c", ccFlags, "-arch", archX86, "-isysroot", sdkPath(iPhoneSim)].flatten()
IOS.prismES2.x86.linker = linker
IOS.prismES2.x86.linkFlags = ["-arch_only", archX86, "-syslibroot", sdkPath(iPhoneSim), linkFlags].flatten()
IOS.prismES2.x86.lib = "prism_es2_${archX86}"

IOS.prismES2.x86_64 = [:]
IOS.prismES2.x86_64.nativeSource = [IOS.prismES2.arm.nativeSource].flatten()
IOS.prismES2.x86_64.compiler = compiler
IOS.prismES2.x86_64.ccFlags = ["-x", "objective-c", ccFlags, "-arch", archX86_64, "-isysroot", sdkPath(iPhoneSim)].flatten()
IOS.prismES2.x86_64.linker = linker
IOS.prismES2.x86_64.linkFlags = ["-arch_only", archX86_64, "-syslibroot", sdkPath(iPhoneSim), linkFlags].flatten()
IOS.prismES2.x86_64.lib = "prism_es2_${archX86_64}"

def closedDir = file("$projectDir/../rt-closed")
IOS.font = [:]
IOS.font.lib = "javafx_font"
IOS.font.javahInclude = [
        "com/sun/javafx/font/**/*",
        "com/sun/javafx/text/**/*"]
IOS.font.variants = ["arm", "arm64", "x86", "x86_64"];

IOS.font.arm = [:]
IOS.font.arm.nativeSource = [file("${project("graphics").projectDir}/src/main/native-font")]
IOS.font.arm.compiler = compiler
IOS.font.arm.ccFlags = ["-DJFXFONT_PLUS", ccFlags, "-arch", archArm, "-isysroot", sdkPath(iPhoneOS)].flatten()
IOS.font.arm.linker = linker
IOS.font.arm.linkFlags = ["-arch_only", archArm, "-syslibroot", sdkPath(iPhoneOS), linkFlags].flatten()
IOS.font.arm.lib = "javafx_font_${archArm}"

IOS.font.arm64 = [:]
IOS.font.arm64.nativeSource = [IOS.font.arm.nativeSource].flatten()
IOS.font.arm64.compiler = compiler
IOS.font.arm64.ccFlags = ["-DJFXFONT_PLUS", ccFlags, "-arch", archArm64, "-isysroot", sdkPath(iPhoneOS)].flatten()
IOS.font.arm64.linker = linker
IOS.font.arm64.linkFlags = ["-arch_only", archArm64, "-syslibroot", sdkPath(iPhoneOS), linkFlags].flatten()
IOS.font.arm64.lib = "javafx_font_${archArm64}"

IOS.font.x86 = [:]
IOS.font.x86.nativeSource = [IOS.font.arm.nativeSource].flatten()
IOS.font.x86.compiler = compiler
IOS.font.x86.ccFlags = ["-DJFXFONT_PLUS", ccFlags, "-arch", archX86, "-isysroot", sdkPath(iPhoneSim)].flatten()
IOS.font.x86.linker = linker
IOS.font.x86.linkFlags = ["-arch_only", archX86, "-syslibroot", sdkPath(iPhoneSim), linkFlags].flatten()
IOS.font.x86.lib = "javafx_font_${archX86}"

IOS.font.x86_64 = [:]
IOS.font.x86_64.nativeSource = [IOS.font.arm.nativeSource].flatten()
IOS.font.x86_64.compiler = compiler
IOS.font.x86_64.ccFlags = ["-DJFXFONT_PLUS", ccFlags, "-arch", archX86_64, "-isysroot", sdkPath(iPhoneSim)].flatten()
IOS.font.x86_64.linker = linker
IOS.font.x86_64.linkFlags = ["-arch_only", archX86_64, "-syslibroot", sdkPath(iPhoneSim), linkFlags].flatten()
IOS.font.x86_64.lib = "javafx_font_${archX86_64}"

IOS.webview = [:]
IOS.webview.lib = "javafx_ios_webnode"
IOS.webview.javahInclude = ["javafx/scene/web/*"]
IOS.webview.variants = ["arm", "arm64", "x86", "x86_64"];

IOS.webview.arm = [:]
IOS.webview.arm.nativeSource = file("${project("web").projectDir}/src/ios/native")
IOS.webview.arm.compiler = compiler
IOS.webview.arm.ccFlags = [ccFlags, "-arch", archArm, "-isysroot", sdkPath(iPhoneOS)].flatten()
IOS.webview.arm.linker = linker
IOS.webview.arm.linkFlags = ["-arch_only", archArm, "-syslibroot", sdkPath(iPhoneOS), linkFlags].flatten()
IOS.webview.arm.lib = "javafx_ios_webnode_${archArm}"

IOS.webview.arm64 = [:]
IOS.webview.arm64.nativeSource = file("${project("web").projectDir}/src/ios/native")
IOS.webview.arm64.compiler = compiler
IOS.webview.arm64.ccFlags = [ccFlags, "-arch", archArm64, "-isysroot", sdkPath(iPhoneOS)].flatten()
IOS.webview.arm64.linker = linker
IOS.webview.arm64.linkFlags = ["-arch_only", archArm64, "-syslibroot", sdkPath(iPhoneOS), linkFlags].flatten()
IOS.webview.arm64.lib = "javafx_ios_webnode_${archArm64}"

IOS.webview.x86 = [:]
IOS.webview.x86.nativeSource = [IOS.webview.arm.nativeSource].flatten()
IOS.webview.x86.compiler = compiler
IOS.webview.x86.ccFlags = [ccFlags, "-arch", archX86, "-isysroot", sdkPath(iPhoneSim)].flatten()
IOS.webview.x86.linker = linker
IOS.webview.x86.linkFlags = ["-arch_only", archX86, "-syslibroot", sdkPath(iPhoneSim), linkFlags].flatten()
IOS.webview.x86.lib = "javafx_ios_webnode_${archX86}"

IOS.webview.x86_64 = [:]
IOS.webview.x86_64.nativeSource = [IOS.webview.arm.nativeSource].flatten()
IOS.webview.x86_64.compiler = compiler
IOS.webview.x86_64.ccFlags = [ccFlags, "-arch", archX86_64, "-isysroot", sdkPath(iPhoneSim)].flatten()
IOS.webview.x86_64.linker = linker
IOS.webview.x86_64.linkFlags = ["-arch_only", archX86_64, "-syslibroot", sdkPath(iPhoneSim), linkFlags].flatten()
IOS.webview.x86_64.lib = "javafx_ios_webnode_${archX86_64}"

IOS.media = [:]
IOS.media.lib = "jfxmedia"
IOS.media.javahSource = files("${project("media").buildDir}/classes/main")
IOS.media.javahClasspath = files("${project("media").buildDir}/classes/main")
IOS.media.javahInclude = ["com/sun/media/jfxmediaimpl/*"]
IOS.media.variants = ["arm", "arm64", "x86", "x86_64"];

IOS.media.arm = [:]
IOS.media.arm.nativeSource = [
    file("${project("media").projectDir}/src/main/native/jfxmedia/platform/ios"),
    file("${project("media").projectDir}/src/main/native/jfxmedia/platform/ios/jni")
]
IOS.media.arm.compiler = compiler
IOS.media.arm.ccFlags = ["-x", "objective-c", ccFlags, "-arch", archArm, "-isysroot", sdkPath(iPhoneOS)].flatten()
IOS.media.arm.linker = linker
IOS.media.arm.linkFlags = ["-arch_only", archArm, "-syslibroot", sdkPath(iPhoneOS), linkFlags].flatten()
IOS.media.arm.lib = "jfxmedia_${archArm}"

IOS.media.arm64 = [:]
IOS.media.arm64.nativeSource = [IOS.media.arm.nativeSource].flatten()
IOS.media.arm64.compiler = compiler
IOS.media.arm64.ccFlags = ["-x", "objective-c", ccFlags, "-arch", archArm64, "-isysroot", sdkPath(iPhoneOS)].flatten()
IOS.media.arm64.linker = linker
IOS.media.arm64.linkFlags = ["-arch_only", archArm64, "-syslibroot", sdkPath(iPhoneOS), linkFlags].flatten()
IOS.media.arm64.lib = "jfxmedia_${archArm64}"

IOS.media.x86 = [:]
IOS.media.x86.nativeSource = [IOS.media.arm.nativeSource].flatten()
IOS.media.x86.compiler = compiler
IOS.media.x86.ccFlags = ["-x", "objective-c", ccFlags, "-arch", archX86, "-isysroot", sdkPath(iPhoneSim)].flatten()
IOS.media.x86.linker = linker
IOS.media.x86.linkFlags = ["-arch_only", archX86, "-syslibroot", sdkPath(iPhoneSim), linkFlags].flatten()
IOS.media.x86.lib = "jfxmedia_${archX86}"

IOS.media.x86_64 = [:]
IOS.media.x86_64.nativeSource = [IOS.media.arm.nativeSource].flatten()
IOS.media.x86_64.compiler = compiler
IOS.media.x86_64.ccFlags = ["-x", "objective-c", ccFlags, "-arch", archX86_64, "-isysroot", sdkPath(iPhoneSim)].flatten()
IOS.media.x86_64.linker = linker
IOS.media.x86_64.linkFlags = ["-arch_only", archX86_64, "-syslibroot", sdkPath(iPhoneSim), linkFlags].flatten()
IOS.media.x86_64.lib = "jfxmedia_${archX86_64}"