tirbofish/dropbear · diff
wip: implemented JNI function headers (finally). doing some testing.
Signature present but could not be verified.
Unverified
@@ -32,11 +32,17 @@ val libPathProvider = provider { layout.projectDirectory.file("libs/$libName").asFile ) - candidates.firstOrNull { it.exists() }?.absolutePath ?: "" + val foundFile = candidates.firstOrNull { it.exists() } + if (foundFile != null) { + foundFile.absolutePath + } else { + println("No Rust library exists") + "" + } } kotlin { - jvm { } + jvm {} val nativeTarget = when { isMacOs && isArm64 -> macosArm64("nativeLib") @@ -65,30 +71,33 @@ kotlin { cinterops { val dropbear by creating { defFile(project.file("src/dropbear.def")) - includeDirs.headerFilterOnly(project.file("headers")) - compilerOpts("-I${project.file("headers").absolutePath}") + includeDirs.headerFilterOnly(project.file("include")) + compilerOpts("-I${project.file("include").absolutePath}") } } } binaries { sharedLib { baseName = "dropbear" + if (isLinux || isMacOs) { linkerOpts("-L$nativeLibDir", "-l$nativeLibNameForLinking", "-Wl,-rpath,\\\$ORIGIN") } else if (isMingwX64) { - linkerOpts(file("$nativeLibDir/$nativeLibNameForLinking.dll.lib").absolutePath) + val importLibName = "$nativeLibNameForLinking.dll.lib" + val importLibPath = file("$nativeLibDir/$importLibName").absolutePath + linkerOpts(importLibPath) } } } }
Large diffs are not rendered by default. Showing the first 50 of 5298 lines. Show full diff