Skip to content

Commit 2c6bd97

Browse files
committed
Added linux target
1 parent 43486e9 commit 2c6bd97

File tree

5 files changed

+12
-34
lines changed

5 files changed

+12
-34
lines changed

core/build.gradle.kts

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,10 @@ import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
22

33
plugins {
44
alias(libs.plugins.kotlinMultiplatform)
5-
id("maven-publish")
65
}
76

8-
group = "pl.lemanski.pandamidi"
9-
version = "0.0.1"
10-
117
kotlin {
12-
mingwX64().apply {
13-
val main by compilations.getting
14-
15-
main.compileTaskProvider.configure {
16-
compilerOptions {
17-
freeCompilerArgs.add("-Xbinary=gc=noop")
18-
}
19-
}
20-
21-
main.cinterops.create("libtsf") {
22-
definitionFile = File(rootDir, "native/libtsf.def")
23-
includeDirs.headerFilterOnly("$rootDir\\native\\include")
24-
extraOpts("-libraryPath", "$rootDir\\native\\lib")
25-
}
26-
}
8+
mingwX64()
279

2810
@OptIn(ExperimentalKotlinGradlePluginApi::class)
2911
compilerOptions {
@@ -41,10 +23,4 @@ kotlin {
4123
implementation(libs.kotlin.test)
4224
}
4325
}
44-
}
45-
46-
publishing {
47-
repositories {
48-
mavenLocal()
49-
}
5026
}
File renamed without changes.

native/libtsf.def

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
package = tinySoundFont
22
headerFilter = "tsf/*"
33
headers = tsf/tsfCInterop.h
4-
staticLibraries.mingw_x64 = libtsf.a
4+
staticLibraries.mingw_x64 = libtsf.a
5+
staticLibraries.linux_x64 = libtsf.a

plugin/src/main/java/pl/lemanski/plugin/KonanPlugin.kt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ abstract class KonanPlugin : Plugin<Project> {
2222
project.layout.projectDirectory
2323
.dir(extension.sourceDir.get())
2424
.asFileTree
25-
// .matching {
26-
// // TODO
27-
// }
2825
)
2926

3027
includeDirs.from(project.layout.projectDirectory.dir(extension.headerDir))

tinySoundFont/build.gradle.kts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,20 @@ kotlin {
1616
mingwX64().apply {
1717
val main by compilations.getting
1818

19-
main.compileTaskProvider.configure {
20-
compilerOptions {
21-
freeCompilerArgs.add("-Xbinary=gc=noop")
22-
}
19+
main.cinterops.create("libtsf") {
20+
definitionFile = File(rootDir, "native/libtsf.def")
21+
includeDirs.headerFilterOnly("$rootDir\\native\\include")
22+
extraOpts("-libraryPath", "$rootDir\\native\\lib\\mingw_x64")
2323
}
24+
}
25+
26+
linuxX64().apply {
27+
val main by compilations.getting
2428

2529
main.cinterops.create("libtsf") {
2630
definitionFile = File(rootDir, "native/libtsf.def")
2731
includeDirs.headerFilterOnly("$rootDir\\native\\include")
28-
extraOpts("-libraryPath", "$rootDir\\native\\lib")
32+
extraOpts("-libraryPath", "$rootDir\\native\\lib\\linux_x64")
2933
}
3034
}
3135

0 commit comments

Comments
 (0)