Split ios tvos watchos builds
This commit is contained in:
parent
add3dc5376
commit
b9d47611c7
@ -306,14 +306,23 @@ kotlin {
|
||||
"macosX64"
|
||||
)
|
||||
val ios64Bit = setOf(
|
||||
"iosArm64", "iosX64", "tvosArm64", "tvosX64"
|
||||
"iosArm64", "iosX64",
|
||||
)
|
||||
val ios32Bit = setOf(
|
||||
"iosArm32", "watchosX86", "watchosArm32", "watchosArm64"
|
||||
"iosArm32"
|
||||
)
|
||||
val mingw64Bit = setOf(
|
||||
"mingwX64"
|
||||
)
|
||||
|
||||
val tvos64Bit = setOf(
|
||||
"tvosArm64", "tvosX64"
|
||||
)
|
||||
|
||||
val watchos32Bit = setOf(
|
||||
"watchosX86", "watchosArm32", "watchosArm64"
|
||||
)
|
||||
|
||||
targets.withType<KotlinNativeTarget> {
|
||||
println("Target $name")
|
||||
|
||||
@ -352,6 +361,32 @@ kotlin {
|
||||
)
|
||||
}
|
||||
|
||||
if (tvos64Bit.contains(this@withType.name)) {
|
||||
defaultSourceSet.dependsOn(createWorkaroundNativeMainSourceSet(this@withType.name, nativeDependencies))
|
||||
println("Setting ios cinterop for $this")
|
||||
val libsodiumCinterop by cinterops.creating {
|
||||
defFile(project.file("src/nativeInterop/cinterop/libsodium.def"))
|
||||
compilerOpts.add("-I${project.rootDir}/sodiumWrapper/static-tvos/include")
|
||||
}
|
||||
kotlinOptions.freeCompilerArgs = listOf(
|
||||
"-include-binary", "${project.rootDir}/sodiumWrapper/static-tvos/lib/libsodium.a"
|
||||
)
|
||||
}
|
||||
|
||||
if (watchos32Bit.contains(this@withType.name)) {
|
||||
defaultSourceSet.dependsOn(createWorkaround32bitNativeMainSourceSet(this@withType.name, nativeDependencies))
|
||||
println("Setting ios cinterop for $this")
|
||||
val libsodiumCinterop by cinterops.creating {
|
||||
defFile(project.file("src/nativeInterop/cinterop/libsodium.def"))
|
||||
compilerOpts.add("-I${project.rootDir}/sodiumWrapper/static-watchos/include")
|
||||
}
|
||||
kotlinOptions.freeCompilerArgs = listOf(
|
||||
"-include-binary", "${project.rootDir}/sodiumWrapper/static-watchos/lib/libsodium.a"
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
compilations.getByName("test") {
|
||||
println("Setting native test dep for $this@withType.name")
|
||||
|
@ -1,6 +1,4 @@
|
||||
./configure
|
||||
PREFIX=$PWD/static-ios
|
||||
cd libsodium
|
||||
./dist-build/ios.sh
|
||||
mkdir ../static-ios
|
||||
cp -R ./libsodium-ios/lib ../static-ios/lib
|
||||
cp -R ./libsodium-ios/include ../static-ios/include
|
||||
./dist-build/ios.sh --prefix=$PREFIX
|
||||
|
||||
|
4
sodiumWrapper/makeTvos.sh
Executable file
4
sodiumWrapper/makeTvos.sh
Executable file
@ -0,0 +1,4 @@
|
||||
PREFIX=$PWD/static-tvos
|
||||
cd libsodium
|
||||
./dist-build/tvos.sh --prefix=$PREFIX
|
||||
|
4
sodiumWrapper/makeWatchos.sh
Executable file
4
sodiumWrapper/makeWatchos.sh
Executable file
@ -0,0 +1,4 @@
|
||||
PREFIX=$PWD/static-watchos
|
||||
cd libsodium
|
||||
./dist-build/watchos.sh --prefix=$PREFIX
|
||||
|
Loading…
x
Reference in New Issue
Block a user