Skip to content

Commit fa46635

Browse files
author
onion
committed
fix: ios package error
1 parent 5ea3d7e commit fa46635

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

composeApp/build.gradle.kts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ plugins {
1515
alias(libs.plugins.composeHotReload)
1616
}
1717

18+
19+
val headersDir = project.file("${rootProject.projectDir}/cpp/stable-diffusion.cpp")
20+
val nativeDefFile = project.file("src/nativeInterop/cinterop/sdloader.def")
1821
kotlin {
1922
androidTarget {
2023
@OptIn(ExperimentalKotlinGradlePluginApi::class)
@@ -59,11 +62,7 @@ kotlin {
5962
}
6063
iosTarget.compilations["main"].cinterops {
6164
val sdloader by creating {
62-
val headersDir = project.file("${rootProject.projectDir}/cpp/stable-diffusion.cpp")
63-
if (!headersDir.exists()) {
64-
println("WARNING: Headers dir not found at $headersDir")
65-
}
66-
defFile(project.file("src/nativeInterop/cinterop/sdloader.def"))
65+
defFile(nativeDefFile)
6766
compilerOpts("-I${headersDir.absolutePath}")
6867
includeDirs(headersDir)
6968
extraOpts("-verbose")

0 commit comments

Comments
 (0)