1 /*
   2  * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 ext.IOS = [:]
  27 
  28 if (BUILD_CLOSED) {
  29     fetchExternalTools('IOS',
  30       ["ios-libs-08.tgz"],
  31       rootProject.CROSS_TOOLS_DIR, rootProject.IS_IMPORT_CROSS_TOOLS)
  32 }
  33 
  34 // TODO Check for presence of iOS tools
  35 IOS.canBuild = IS_MAC
  36 if (!IOS.canBuild) return;
  37 
  38 IOS.compileSwing = false;
  39 IOS.compileSWT = false;
  40 IOS.compileFXPackager = false;
  41 
  42 defineProperty("USE_LIPO", "false")
  43 IOS.useLipo = Boolean.parseBoolean(USE_LIPO)
  44 
  45 defineProperty("GENERATE_SYMBOLS", "false")
  46 IOS.generateSymbols = Boolean.parseBoolean(GENERATE_SYMBOLS)
  47 
  48 defineProperty("BUILD_IOS_TOOLS", "true")
  49 ext.IS_BUILD_IOS_TOOLS = Boolean.parseBoolean(BUILD_IOS_TOOLS)
  50 
  51 IOS.generateSymbolsExcludes = [
  52     "libprism_sw.a",
  53     "libdecora_sse_armv7.a"
  54 ]
  55 
  56 defineProperty("IOS_VERSION", "7.0")
  57 
  58 // Lambda for naming the generated libs
  59 IOS.library = { name -> return "lib${name}.a" as String }
  60 
  61 IOS.libDest = "lib"
  62 
  63 IOS.jfxrtJarExcludes = [
  64     "**/*.hlsl",
  65     "com/sun/glass/ui/win",
  66     "com/sun/prism/d3d",
  67     "com/sun/prism/es2/gl/win",
  68     "com/sun/prism/null3d",
  69     "com/sun/scenario/effect/impl/hw/d3d",
  70 
  71     "com/sun/glass/events/mac",
  72     "com/sun/glass/ui/mac",
  73     "com/sun/prism/es2/gl/mac",
  74     "com/sun/glass/ui/android",
  75     "com/sun/glass/ui/gtk",
  76 
  77     "com/sun/glass/ui/lens",
  78     "com/sun/prism/es2/gl/eglfb",
  79     "com/sun/prism/es2/gl/eglx11",
  80     "com/sun/prism/es2/gl/x11",
  81 
  82     "com/sun/glass/ui/swt", // SWT glass
  83 
  84     "javafx/embed/swing", // Swing Interop
  85 
  86     "javafx/embed/swt", // SWT Interop
  87 ]
  88 
  89 def archArm = "armv7"
  90 def archArm64 = "arm64"
  91 def archX86 = "i386"
  92 def archX86_64 = "x86_64"
  93 def iPhoneOS = "iPhoneOS"
  94 def iPhoneSim = "iPhoneSimulator"
  95 
  96 String sdkPath(String platform) {
  97     return "/Applications/Xcode.app/Contents/Developer/Platforms/${platform}.platform/Developer/SDKs/${platform}${IOS_VERSION}.sdk";
  98 }
  99 
 100 def linkFlags = [
 101     "-static",
 102     "-framework", "Foundation",
 103     "-framework", "CoreGraphics",
 104     "-framework", "CoreText",
 105     "-framework", "UIKit",
 106     "-framework", "QuartzCore",
 107     "-framework", "OpenGLES"].flatten()
 108 
 109 def ccFlags = [
 110     "-miphoneos-version-min=6.0", "-fmessage-length=0", "-std=c99", "-fno-common",
 111     "-Wall", "-fno-strict-aliasing", "-fwrapv", "-fpascal-strings", "-fobjc-abi-version=2", "-fobjc-legacy-dispatch",
 112     "-I$JDK_HOME/include", "-I$JDK_HOME/include/darwin", "-c",
 113     IS_DEBUG_NATIVE ? ["-O0", "-DDEBUG", "-g"] : ["-O3", "-DNDEBUG"]].flatten()
 114 
 115 def compiler = "clang"
 116 def linker = "libtool"
 117 
 118 IOS.javafxPlatformProperties ="""javafx.platform=ios
 119 ios.javax.xml.stream.XMLInputFactory=com.sun.xml.stream.ZephyrParserFactory
 120 ios.javax.xml.stream.XMLOutputFactory=com.sun.xml.stream.ZephyrWriterFactory
 121 ios.javax.xml.stream.XMLEventFactory=com.sun.xml.stream.events.ZephyrEventFactory
 122 ios.jfxmedia.platforms=IOSPlatform
 123 ios.glass.platform=ios
 124 ios.prism.allowhidpi=true
 125 ios.prism.mintexturesize=16
 126 ios.prism.verbose=true
 127 ios.prism.static.libraries=true
 128 ios.prism.useNativeIIO=false"""
 129 
 130 IOS.glass = [:]
 131 IOS.glass.variants = ["arm", "arm64", "x86", "x86_64"];
 132 IOS.glass.javahInclude = [
 133     "com/sun/glass/events/**",
 134     "com/sun/glass/ui/*",
 135     "com/sun/glass/ui/ios/*"]
 136 IOS.glass.lib = "glass"
 137 
 138 IOS.glass.arm = [:]
 139 IOS.glass.arm.nativeSource = file("${project("graphics").projectDir}/src/main/native-glass/ios")
 140 IOS.glass.arm.compiler = compiler
 141 IOS.glass.arm.ccFlags = ["-x", "objective-c", ccFlags, "-arch", archArm, "-isysroot", sdkPath(iPhoneOS)].flatten()
 142 IOS.glass.arm.linker = linker
 143 IOS.glass.arm.linkFlags = ["-arch_only", archArm, "-syslibroot", sdkPath(iPhoneOS), linkFlags, "-L${sdkPath(iPhoneOS)}/usr/lib"].flatten()
 144 IOS.glass.arm.lib = "glass_${archArm}"
 145 
 146 IOS.glass.arm64 = [:]
 147 IOS.glass.arm64.nativeSource = file("${project("graphics").projectDir}/src/main/native-glass/ios")
 148 IOS.glass.arm64.compiler = compiler
 149 IOS.glass.arm64.ccFlags = ["-x", "objective-c", ccFlags, "-arch", archArm64, "-isysroot", sdkPath(iPhoneOS)].flatten()
 150 IOS.glass.arm64.linker = linker
 151 IOS.glass.arm64.linkFlags = ["-arch_only", archArm64, "-syslibroot", sdkPath(iPhoneOS), linkFlags, "-L${sdkPath(iPhoneOS)}/usr/lib"].flatten()
 152 IOS.glass.arm64.lib = "glass_${archArm64}"
 153 
 154 IOS.glass.x86 = [:]
 155 IOS.glass.x86.nativeSource = file("${project("graphics").projectDir}/src/main/native-glass/ios")
 156 IOS.glass.x86.compiler = compiler
 157 IOS.glass.x86.ccFlags = ["-x", "objective-c", ccFlags, "-arch", archX86, "-isysroot", sdkPath(iPhoneSim)].flatten()
 158 IOS.glass.x86.linker = linker
 159 IOS.glass.x86.linkFlags = ["-arch_only", archX86, "-syslibroot", sdkPath(iPhoneSim), linkFlags, "-L${sdkPath(iPhoneSim)}/usr/lib"].flatten()
 160 IOS.glass.x86.lib = "glass_${archX86}"
 161 
 162 IOS.glass.x86_64 = [:]
 163 IOS.glass.x86_64.nativeSource = file("${project("graphics").projectDir}/src/main/native-glass/ios")
 164 IOS.glass.x86_64.compiler = compiler
 165 IOS.glass.x86_64.ccFlags = ["-x", "objective-c", ccFlags, "-arch", archX86_64, "-isysroot", sdkPath(iPhoneSim)].flatten()
 166 IOS.glass.x86_64.linker = linker
 167 IOS.glass.x86_64.linkFlags = ["-arch_only", archX86_64, "-syslibroot", sdkPath(iPhoneSim), linkFlags, "-L${sdkPath(iPhoneSim)}/usr/lib"].flatten()
 168 IOS.glass.x86_64.lib = "glass_${archX86_64}"
 169 
 170 IOS.extensions = [:]
 171 IOS.extensions.variants = ["arm", "arm64", "x86", "x86_64"];
 172 IOS.extensions.javahSource = files("${project("extensions").buildDir}/classes/ios")
 173 IOS.extensions.javahClasspath = files("${project("extensions").buildDir}/classes/ios/")
 174 IOS.extensions.javahInclude = ["com/sun/javafx/ext/device/ios/**/*"]
 175 IOS.extensions.lib = "extensions_ios"
 176 
 177 IOS.extensions.arm = [:]
 178 IOS.extensions.arm.nativeSource = file("${project("extensions").projectDir}/src/ios/native-device/ios")
 179 IOS.extensions.arm.compiler = compiler
 180 IOS.extensions.arm.ccFlags = ["-x", "objective-c", ccFlags, "-arch", archArm, "-isysroot", sdkPath(iPhoneOS)].flatten()
 181 IOS.extensions.arm.linker = linker
 182 IOS.extensions.arm.linkFlags = ["-arch_only", archArm, "-syslibroot", sdkPath(iPhoneOS), linkFlags, "-L${sdkPath(iPhoneOS)}/usr/lib"].flatten()
 183 IOS.extensions.arm.lib = "extensions_ios_${archArm}"
 184 
 185 IOS.extensions.arm64 = [:]
 186 IOS.extensions.arm64.nativeSource = file("${project("extensions").projectDir}/src/ios/native-device/ios")
 187 IOS.extensions.arm64.compiler = compiler
 188 IOS.extensions.arm64.ccFlags = ["-x", "objective-c", ccFlags, "-arch", archArm64, "-isysroot", sdkPath(iPhoneOS)].flatten()
 189 IOS.extensions.arm64.linker = linker
 190 IOS.extensions.arm64.linkFlags = ["-arch_only", archArm64, "-syslibroot", sdkPath(iPhoneOS), linkFlags, "-L${sdkPath(iPhoneOS)}/usr/lib"].flatten()
 191 IOS.extensions.arm64.lib = "extensions_ios_${archArm64}"
 192 
 193 IOS.extensions.x86 = [:]
 194 IOS.extensions.x86.nativeSource = file("${project("extensions").projectDir}/src/ios/native-device/ios")
 195 IOS.extensions.x86.compiler = compiler
 196 IOS.extensions.x86.ccFlags = ["-x", "objective-c", ccFlags, "-arch", archX86, "-isysroot", sdkPath(iPhoneSim)].flatten()
 197 IOS.extensions.x86.linker = linker
 198 IOS.extensions.x86.linkFlags = ["-arch_only", archX86, "-syslibroot", sdkPath(iPhoneSim), linkFlags, "-L${sdkPath(iPhoneSim)}/usr/lib"].flatten()
 199 IOS.extensions.x86.lib = "extensions_ios_${archX86}"
 200 
 201 IOS.extensions.x86_64 = [:]
 202 IOS.extensions.x86_64.nativeSource = file("${project("extensions").projectDir}/src/ios/native-device/ios")
 203 IOS.extensions.x86_64.compiler = compiler
 204 IOS.extensions.x86_64.ccFlags = ["-x", "objective-c", ccFlags, "-arch", archX86_64, "-isysroot", sdkPath(iPhoneSim)].flatten()
 205 IOS.extensions.x86_64.linker = linker
 206 IOS.extensions.x86_64.linkFlags = ["-arch_only", archX86_64, "-syslibroot", sdkPath(iPhoneSim), linkFlags, "-L${sdkPath(iPhoneSim)}/usr/lib"].flatten()
 207 IOS.extensions.x86_64.lib = "extensions_ios_${archX86_64}"
 208 
 209 IOS.decora = [:]
 210 IOS.decora.variants = ["arm", "arm64"];
 211 IOS.decora.lib = "decora_sse"
 212 
 213 IOS.decora.arm = [:]
 214 IOS.decora.arm.compiler = compiler
 215 IOS.decora.arm.ccFlags = [ccFlags, "-arch", archArm, "-isysroot", sdkPath(iPhoneOS), "-ffast-math"].flatten()
 216 IOS.decora.arm.linker = linker
 217 IOS.decora.arm.linkFlags = ["-arch_only", archArm, "-syslibroot", sdkPath(iPhoneOS), linkFlags].flatten()
 218 IOS.decora.arm.lib = "decora_sse_${archArm}"
 219 
 220 IOS.decora.arm64 = [:]
 221 IOS.decora.arm64.compiler = compiler
 222 IOS.decora.arm64.ccFlags = [ccFlags, "-arch", archArm64, "-isysroot", sdkPath(iPhoneOS), "-ffast-math"].flatten()
 223 IOS.decora.arm64.linker = linker
 224 IOS.decora.arm64.linkFlags = ["-arch_only", archArm64, "-syslibroot", sdkPath(iPhoneOS), linkFlags].flatten()
 225 IOS.decora.arm64.lib = "decora_sse_${archArm64}"
 226 
 227 IOS.prism = [:]
 228 IOS.prism.lib = "prism_common"
 229 IOS.prism.javahInclude = ["com/sun/prism/impl/**/*", "com/sun/prism/PresentableState*"]
 230 IOS.prism.variants = ["arm", "arm64", "x86", "x86_64"];
 231 
 232 IOS.prism.arm = [:]
 233 IOS.prism.arm.nativeSource = file("${project("graphics").projectDir}/src/main/native-prism")
 234 IOS.prism.arm.compiler = compiler
 235 IOS.prism.arm.ccFlags = [ccFlags, "-arch", archArm, "-isysroot", sdkPath(iPhoneOS), "-DINLINE=inline"].flatten()
 236 IOS.prism.arm.linker = linker
 237 IOS.prism.arm.linkFlags = ["-arch_only", archArm, "-syslibroot", sdkPath(iPhoneOS), linkFlags].flatten()
 238 IOS.prism.arm.lib = "prism_common_${archArm}"
 239 
 240 IOS.prism.arm64 = [:]
 241 IOS.prism.arm64.nativeSource = file("${project("graphics").projectDir}/src/main/native-prism")
 242 IOS.prism.arm64.compiler = compiler
 243 IOS.prism.arm64.ccFlags = [ccFlags, "-arch", archArm64, "-isysroot", sdkPath(iPhoneOS), "-DINLINE=inline"].flatten()
 244 IOS.prism.arm64.linker = linker
 245 IOS.prism.arm64.linkFlags = ["-arch_only", archArm64, "-syslibroot", sdkPath(iPhoneOS), linkFlags].flatten()
 246 IOS.prism.arm64.lib = "prism_common_${archArm64}"
 247 
 248 IOS.prism.x86 = [:]
 249 IOS.prism.x86.nativeSource = file("${project("graphics").projectDir}/src/main/native-prism")
 250 IOS.prism.x86.compiler = compiler
 251 IOS.prism.x86.ccFlags = [ccFlags, "-arch", archX86, "-isysroot", sdkPath(iPhoneSim), "-DINLINE=inline"].flatten()
 252 IOS.prism.x86.linker = linker
 253 IOS.prism.x86.linkFlags = ["-arch_only", archX86, "-syslibroot", sdkPath(iPhoneSim), linkFlags].flatten()
 254 IOS.prism.x86.lib = "prism_common_${archX86}"
 255 
 256 IOS.prism.x86_64 = [:]
 257 IOS.prism.x86_64.nativeSource = file("${project("graphics").projectDir}/src/main/native-prism")
 258 IOS.prism.x86_64.compiler = compiler
 259 IOS.prism.x86_64.ccFlags = [ccFlags, "-arch", archX86_64, "-isysroot", sdkPath(iPhoneSim), "-DINLINE=inline"].flatten()
 260 IOS.prism.x86_64.linker = linker
 261 IOS.prism.x86_64.linkFlags = ["-arch_only", archX86_64, "-syslibroot", sdkPath(iPhoneSim), linkFlags].flatten()
 262 IOS.prism.x86_64.lib = "prism_common_${archX86_64}"
 263 
 264 IOS.prismSW = [:]
 265 IOS.prismSW.lib = "prism_sw"
 266 IOS.prismSW.javahInclude = ["com/sun/pisces/**/*"]
 267 IOS.prismSW.variants = ["arm", "arm64", "x86", "x86_64"];
 268 
 269 IOS.prismSW.arm = [:]
 270 IOS.prismSW.arm.nativeSource = file("${project("graphics").projectDir}/src/main/native-prism-sw")
 271 IOS.prismSW.arm.compiler = compiler
 272 IOS.prismSW.arm.ccFlags = [IOS.prism.arm.ccFlags].flatten()
 273 IOS.prismSW.arm.linker = linker
 274 IOS.prismSW.arm.linkFlags = [IOS.prism.arm.linkFlags].flatten()
 275 IOS.prismSW.arm.lib = "prism_sw_${archArm}"
 276 
 277 IOS.prismSW.arm64 = [:]
 278 IOS.prismSW.arm64.nativeSource = file("${project("graphics").projectDir}/src/main/native-prism-sw")
 279 IOS.prismSW.arm64.compiler = compiler
 280 IOS.prismSW.arm64.ccFlags = [IOS.prism.arm64.ccFlags].flatten()
 281 IOS.prismSW.arm64.linker = linker
 282 IOS.prismSW.arm64.linkFlags = [IOS.prism.arm64.linkFlags].flatten()
 283 IOS.prismSW.arm64.lib = "prism_sw_${archArm64}"
 284 
 285 IOS.prismSW.x86 = [:]
 286 IOS.prismSW.x86.nativeSource = file("${project("graphics").projectDir}/src/main/native-prism-sw")
 287 IOS.prismSW.x86.compiler = compiler
 288 IOS.prismSW.x86.ccFlags = [IOS.prism.x86.ccFlags].flatten()
 289 IOS.prismSW.x86.linker = linker
 290 IOS.prismSW.x86.linkFlags = [IOS.prism.x86.linkFlags].flatten()
 291 IOS.prismSW.x86.lib = "prism_sw_${archX86}"
 292 
 293 IOS.prismSW.x86_64 = [:]
 294 IOS.prismSW.x86_64.nativeSource = file("${project("graphics").projectDir}/src/main/native-prism-sw")
 295 IOS.prismSW.x86_64.compiler = compiler
 296 IOS.prismSW.x86_64.ccFlags = [IOS.prism.x86_64.ccFlags].flatten()
 297 IOS.prismSW.x86_64.linker = linker
 298 IOS.prismSW.x86_64.linkFlags = [IOS.prism.x86_64.linkFlags].flatten()
 299 IOS.prismSW.x86_64.lib = "prism_sw_${archX86_64}"
 300 
 301 IOS.iio = [:]
 302 IOS.iio.lib = "javafx_iio"
 303 IOS.iio.javahInclude = ["com/sun/javafx/iio/**/*"]
 304 IOS.iio.variants = ["arm", "arm64", "x86", "x86_64"];
 305 
 306 IOS.iio.arm = [:]
 307 IOS.iio.arm.nativeSource = [
 308     file("${project("graphics").projectDir}/src/main/native-iio"),
 309     file("${project("graphics").projectDir}/src/main/native-iio/ios"),
 310     file("${project("graphics").projectDir}/src/main/native-iio/libjpeg7")]
 311 IOS.iio.arm.compiler = compiler
 312 IOS.iio.arm.ccFlags = ["-x", "objective-c", ccFlags, "-arch", archArm, "-isysroot", sdkPath(iPhoneOS), "-ffast-math"].flatten()
 313 IOS.iio.arm.linker = linker
 314 IOS.iio.arm.linkFlags = ["-arch_only", archArm, "-syslibroot", sdkPath(iPhoneOS), linkFlags].flatten()
 315 IOS.iio.arm.lib = "javafx_iio_${archArm}"
 316 
 317 IOS.iio.arm64 = [:]
 318 IOS.iio.arm64.nativeSource = [IOS.iio.arm.nativeSource].flatten()
 319 IOS.iio.arm64.compiler = compiler
 320 IOS.iio.arm64.ccFlags = ["-x", "objective-c", ccFlags, "-arch", archArm64, "-isysroot", sdkPath(iPhoneOS), "-ffast-math"].flatten()
 321 IOS.iio.arm64.linker = linker
 322 IOS.iio.arm64.linkFlags = ["-arch_only", archArm64, "-syslibroot", sdkPath(iPhoneOS), linkFlags].flatten()
 323 IOS.iio.arm64.lib = "javafx_iio_${archArm64}"
 324 
 325 IOS.iio.x86 = [:]
 326 IOS.iio.x86.nativeSource = [IOS.iio.arm.nativeSource].flatten()
 327 IOS.iio.x86.compiler = compiler
 328 IOS.iio.x86.ccFlags = ["-x", "objective-c", ccFlags, "-arch", archX86, "-isysroot", sdkPath(iPhoneSim), "-ffast-math"].flatten()
 329 IOS.iio.x86.linker = linker
 330 IOS.iio.x86.linkFlags = ["-arch_only", archX86, "-syslibroot", sdkPath(iPhoneSim), linkFlags].flatten()
 331 IOS.iio.x86.lib = "javafx_iio_${archX86}"
 332 
 333 IOS.iio.x86_64 = [:]
 334 IOS.iio.x86_64.nativeSource = [IOS.iio.arm.nativeSource].flatten()
 335 IOS.iio.x86_64.compiler = compiler
 336 IOS.iio.x86_64.ccFlags = ["-x", "objective-c", ccFlags, "-arch", archX86_64, "-isysroot", sdkPath(iPhoneSim), "-ffast-math"].flatten()
 337 IOS.iio.x86_64.linker = linker
 338 IOS.iio.x86_64.linkFlags = ["-arch_only", archX86_64, "-syslibroot", sdkPath(iPhoneSim), linkFlags].flatten()
 339 IOS.iio.x86_64.lib = "javafx_iio_${archX86_64}"
 340 
 341 IOS.prismES2 = [:]
 342 IOS.prismES2.lib = "prism_es2"
 343 IOS.prismES2.javahInclude = ["com/sun/prism/es2/**/*"]
 344 IOS.prismES2.variants = ["arm", "arm64", "x86", "x86_64"];
 345 
 346 IOS.prismES2.arm = [:]
 347 IOS.prismES2.arm.nativeSource = [
 348     file("${project("graphics").projectDir}/src/main/native-prism-es2"),
 349     file("${project("graphics").projectDir}/src/main/native-prism-es2/GL"),
 350     file("${project("graphics").projectDir}/src/main/native-prism-es2/ios")
 351 ]
 352 IOS.prismES2.arm.compiler = compiler
 353 IOS.prismES2.arm.ccFlags = ["-x", "objective-c", ccFlags, "-arch", archArm, "-isysroot", sdkPath(iPhoneOS)].flatten()
 354 IOS.prismES2.arm.linker = linker
 355 IOS.prismES2.arm.linkFlags = ["-arch_only", archArm, "-syslibroot", sdkPath(iPhoneOS), linkFlags].flatten()
 356 IOS.prismES2.arm.lib = "prism_es2_${archArm}"
 357 
 358 IOS.prismES2.arm64 = [:]
 359 IOS.prismES2.arm64.nativeSource = [IOS.prismES2.arm.nativeSource].flatten()
 360 IOS.prismES2.arm64.compiler = compiler
 361 IOS.prismES2.arm64.ccFlags = ["-x", "objective-c", ccFlags, "-arch", archArm64, "-isysroot", sdkPath(iPhoneOS)].flatten()
 362 IOS.prismES2.arm64.linker = linker
 363 IOS.prismES2.arm64.linkFlags = ["-arch_only", archArm64, "-syslibroot", sdkPath(iPhoneOS), linkFlags].flatten()
 364 IOS.prismES2.arm64.lib = "prism_es2_${archArm64}"
 365 
 366 IOS.prismES2.x86 = [:]
 367 IOS.prismES2.x86.nativeSource = [IOS.prismES2.arm.nativeSource].flatten()
 368 IOS.prismES2.x86.compiler = compiler
 369 IOS.prismES2.x86.ccFlags = ["-x", "objective-c", ccFlags, "-arch", archX86, "-isysroot", sdkPath(iPhoneSim)].flatten()
 370 IOS.prismES2.x86.linker = linker
 371 IOS.prismES2.x86.linkFlags = ["-arch_only", archX86, "-syslibroot", sdkPath(iPhoneSim), linkFlags].flatten()
 372 IOS.prismES2.x86.lib = "prism_es2_${archX86}"
 373 
 374 IOS.prismES2.x86_64 = [:]
 375 IOS.prismES2.x86_64.nativeSource = [IOS.prismES2.arm.nativeSource].flatten()
 376 IOS.prismES2.x86_64.compiler = compiler
 377 IOS.prismES2.x86_64.ccFlags = ["-x", "objective-c", ccFlags, "-arch", archX86_64, "-isysroot", sdkPath(iPhoneSim)].flatten()
 378 IOS.prismES2.x86_64.linker = linker
 379 IOS.prismES2.x86_64.linkFlags = ["-arch_only", archX86_64, "-syslibroot", sdkPath(iPhoneSim), linkFlags].flatten()
 380 IOS.prismES2.x86_64.lib = "prism_es2_${archX86_64}"
 381 
 382 def closedDir = file("$projectDir/../rt-closed")
 383 IOS.font = [:]
 384 IOS.font.lib = "javafx_font"
 385 IOS.font.javahInclude = [
 386         "com/sun/javafx/font/**/*",
 387         "com/sun/javafx/text/**/*"]
 388 IOS.font.variants = ["arm", "arm64", "x86", "x86_64"];
 389 
 390 IOS.font.arm = [:]
 391 IOS.font.arm.nativeSource = [file("${project("graphics").projectDir}/src/main/native-font")]
 392 IOS.font.arm.compiler = compiler
 393 IOS.font.arm.ccFlags = ["-DJFXFONT_PLUS", ccFlags, "-arch", archArm, "-isysroot", sdkPath(iPhoneOS)].flatten()
 394 IOS.font.arm.linker = linker
 395 IOS.font.arm.linkFlags = ["-arch_only", archArm, "-syslibroot", sdkPath(iPhoneOS), linkFlags].flatten()
 396 IOS.font.arm.lib = "javafx_font_${archArm}"
 397 
 398 IOS.font.arm64 = [:]
 399 IOS.font.arm64.nativeSource = [IOS.font.arm.nativeSource].flatten()
 400 IOS.font.arm64.compiler = compiler
 401 IOS.font.arm64.ccFlags = ["-DJFXFONT_PLUS", ccFlags, "-arch", archArm64, "-isysroot", sdkPath(iPhoneOS)].flatten()
 402 IOS.font.arm64.linker = linker
 403 IOS.font.arm64.linkFlags = ["-arch_only", archArm64, "-syslibroot", sdkPath(iPhoneOS), linkFlags].flatten()
 404 IOS.font.arm64.lib = "javafx_font_${archArm64}"
 405 
 406 IOS.font.x86 = [:]
 407 IOS.font.x86.nativeSource = [IOS.font.arm.nativeSource].flatten()
 408 IOS.font.x86.compiler = compiler
 409 IOS.font.x86.ccFlags = ["-DJFXFONT_PLUS", ccFlags, "-arch", archX86, "-isysroot", sdkPath(iPhoneSim)].flatten()
 410 IOS.font.x86.linker = linker
 411 IOS.font.x86.linkFlags = ["-arch_only", archX86, "-syslibroot", sdkPath(iPhoneSim), linkFlags].flatten()
 412 IOS.font.x86.lib = "javafx_font_${archX86}"
 413 
 414 IOS.font.x86_64 = [:]
 415 IOS.font.x86_64.nativeSource = [IOS.font.arm.nativeSource].flatten()
 416 IOS.font.x86_64.compiler = compiler
 417 IOS.font.x86_64.ccFlags = ["-DJFXFONT_PLUS", ccFlags, "-arch", archX86_64, "-isysroot", sdkPath(iPhoneSim)].flatten()
 418 IOS.font.x86_64.linker = linker
 419 IOS.font.x86_64.linkFlags = ["-arch_only", archX86_64, "-syslibroot", sdkPath(iPhoneSim), linkFlags].flatten()
 420 IOS.font.x86_64.lib = "javafx_font_${archX86_64}"
 421 
 422 IOS.webview = [:]
 423 IOS.webview.lib = "javafx_ios_webnode"
 424 IOS.webview.javahInclude = ["javafx/scene/web/*"]
 425 IOS.webview.variants = ["arm", "arm64", "x86", "x86_64"];
 426 
 427 IOS.webview.arm = [:]
 428 IOS.webview.arm.nativeSource = file("${project("web").projectDir}/src/ios/native")
 429 IOS.webview.arm.compiler = compiler
 430 IOS.webview.arm.ccFlags = [ccFlags, "-arch", archArm, "-isysroot", sdkPath(iPhoneOS)].flatten()
 431 IOS.webview.arm.linker = linker
 432 IOS.webview.arm.linkFlags = ["-arch_only", archArm, "-syslibroot", sdkPath(iPhoneOS), linkFlags].flatten()
 433 IOS.webview.arm.lib = "javafx_ios_webnode_${archArm}"
 434 
 435 IOS.webview.arm64 = [:]
 436 IOS.webview.arm64.nativeSource = file("${project("web").projectDir}/src/ios/native")
 437 IOS.webview.arm64.compiler = compiler
 438 IOS.webview.arm64.ccFlags = [ccFlags, "-arch", archArm64, "-isysroot", sdkPath(iPhoneOS)].flatten()
 439 IOS.webview.arm64.linker = linker
 440 IOS.webview.arm64.linkFlags = ["-arch_only", archArm64, "-syslibroot", sdkPath(iPhoneOS), linkFlags].flatten()
 441 IOS.webview.arm64.lib = "javafx_ios_webnode_${archArm64}"
 442 
 443 IOS.webview.x86 = [:]
 444 IOS.webview.x86.nativeSource = [IOS.webview.arm.nativeSource].flatten()
 445 IOS.webview.x86.compiler = compiler
 446 IOS.webview.x86.ccFlags = [ccFlags, "-arch", archX86, "-isysroot", sdkPath(iPhoneSim)].flatten()
 447 IOS.webview.x86.linker = linker
 448 IOS.webview.x86.linkFlags = ["-arch_only", archX86, "-syslibroot", sdkPath(iPhoneSim), linkFlags].flatten()
 449 IOS.webview.x86.lib = "javafx_ios_webnode_${archX86}"
 450 
 451 IOS.webview.x86_64 = [:]
 452 IOS.webview.x86_64.nativeSource = [IOS.webview.arm.nativeSource].flatten()
 453 IOS.webview.x86_64.compiler = compiler
 454 IOS.webview.x86_64.ccFlags = [ccFlags, "-arch", archX86_64, "-isysroot", sdkPath(iPhoneSim)].flatten()
 455 IOS.webview.x86_64.linker = linker
 456 IOS.webview.x86_64.linkFlags = ["-arch_only", archX86_64, "-syslibroot", sdkPath(iPhoneSim), linkFlags].flatten()
 457 IOS.webview.x86_64.lib = "javafx_ios_webnode_${archX86_64}"
 458 
 459 IOS.media = [:]
 460 IOS.media.lib = "jfxmedia"
 461 IOS.media.javahSource = files("${project("media").buildDir}/classes/main")
 462 IOS.media.javahClasspath = files("${project("media").buildDir}/classes/main")
 463 IOS.media.javahInclude = ["com/sun/media/jfxmediaimpl/*"]
 464 IOS.media.variants = ["arm", "arm64", "x86", "x86_64"];
 465 
 466 IOS.media.arm = [:]
 467 IOS.media.arm.nativeSource = [
 468     file("${project("media").projectDir}/src/main/native/jfxmedia/platform/ios"),
 469     file("${project("media").projectDir}/src/main/native/jfxmedia/platform/ios/jni")
 470 ]
 471 IOS.media.arm.compiler = compiler
 472 IOS.media.arm.ccFlags = ["-x", "objective-c", ccFlags, "-arch", archArm, "-isysroot", sdkPath(iPhoneOS)].flatten()
 473 IOS.media.arm.linker = linker
 474 IOS.media.arm.linkFlags = ["-arch_only", archArm, "-syslibroot", sdkPath(iPhoneOS), linkFlags].flatten()
 475 IOS.media.arm.lib = "jfxmedia_${archArm}"
 476 
 477 IOS.media.arm64 = [:]
 478 IOS.media.arm64.nativeSource = [IOS.media.arm.nativeSource].flatten()
 479 IOS.media.arm64.compiler = compiler
 480 IOS.media.arm64.ccFlags = ["-x", "objective-c", ccFlags, "-arch", archArm64, "-isysroot", sdkPath(iPhoneOS)].flatten()
 481 IOS.media.arm64.linker = linker
 482 IOS.media.arm64.linkFlags = ["-arch_only", archArm64, "-syslibroot", sdkPath(iPhoneOS), linkFlags].flatten()
 483 IOS.media.arm64.lib = "jfxmedia_${archArm64}"
 484 
 485 IOS.media.x86 = [:]
 486 IOS.media.x86.nativeSource = [IOS.media.arm.nativeSource].flatten()
 487 IOS.media.x86.compiler = compiler
 488 IOS.media.x86.ccFlags = ["-x", "objective-c", ccFlags, "-arch", archX86, "-isysroot", sdkPath(iPhoneSim)].flatten()
 489 IOS.media.x86.linker = linker
 490 IOS.media.x86.linkFlags = ["-arch_only", archX86, "-syslibroot", sdkPath(iPhoneSim), linkFlags].flatten()
 491 IOS.media.x86.lib = "jfxmedia_${archX86}"
 492 
 493 IOS.media.x86_64 = [:]
 494 IOS.media.x86_64.nativeSource = [IOS.media.arm.nativeSource].flatten()
 495 IOS.media.x86_64.compiler = compiler
 496 IOS.media.x86_64.ccFlags = ["-x", "objective-c", ccFlags, "-arch", archX86_64, "-isysroot", sdkPath(iPhoneSim)].flatten()
 497 IOS.media.x86_64.linker = linker
 498 IOS.media.x86_64.linkFlags = ["-arch_only", archX86_64, "-syslibroot", sdkPath(iPhoneSim), linkFlags].flatten()
 499 IOS.media.x86_64.lib = "jfxmedia_${archX86_64}"
 500