diff options
Diffstat (limited to 'project/Jni.scala')
-rw-r--r-- | project/Jni.scala | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/project/Jni.scala b/project/Jni.scala index d597269..db345e2 100644 --- a/project/Jni.scala +++ b/project/Jni.scala @@ -6,18 +6,19 @@ object Jni { val jdkHome = settingKey[File]("Home of JDK.") val javahHeaderDirectory = settingKey[File]("Directory where generated javah header files are placed.") val javahClasses = settingKey[Seq[String]]("Fully qualified names of classes containing native declarations.") + val javahClasspath = taskKey[Seq[File]]("Classpath to use in javah.") val javah = taskKey[Seq[File]]("Generate JNI headers.") val defaultSettings: Seq[Setting[_]] = Seq( jdkHome := file(sys.env("JAVA_HOME")), javahHeaderDirectory := (sourceManaged in Native).value / "javah", - javah := javahImpl.value, + javah := javahImpl.value, sourceGenerators in Native <+= javah map { headers => headers}, includeDirectories in Native += javahHeaderDirectory.value, includeDirectories in Native += jdkHome.value / "include") def javahImpl = Def.task { - val cps = (internalDependencyClasspath in Compile).value.map(_.data).map(_.getAbsolutePath) + val cps = javahClasspath.value val cp = cps.mkString(":") for (clazz <- javahClasses.value) { val parts = Seq( |