Skip to content

Commit 674eacd

Browse files
committedFeb 29, 2024·
player-sample: pass -lasound on linux.
1 parent 3dfd33e commit 674eacd

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed
 

‎player-sample/build.gradle.kts

+10-2
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,16 @@ kotlin {
4242
val nativeTarget = when {
4343
hostOs == "Mac OS X" && isArm64 -> macosArm64("macosArm64")
4444
hostOs == "Mac OS X" && !isArm64 -> macosX64("macosX64")
45-
hostOs == "Linux" && isArm64 -> linuxArm64("linuxX64")
46-
hostOs == "Linux" && !isArm64 -> linuxX64("linuxArm64")
45+
hostOs == "Linux" && isArm64 -> linuxArm64("linuxX64").apply {
46+
binaries.executable {
47+
linkerOpts = mutableListOf("-lasound")
48+
}
49+
}
50+
hostOs == "Linux" && !isArm64 -> linuxX64("linuxArm64").apply {
51+
binaries.executable {
52+
linkerOpts = mutableListOf("-lasound")
53+
}
54+
}
4755
isMingwX64 -> mingwX64("native")
4856
else -> throw GradleException("Host OS is not supported in Kotlin/Native.")
4957
}

0 commit comments

Comments
 (0)
Please sign in to comment.