aboutsummaryrefslogtreecommitdiff
path: root/plugin/src/sbt-test/sbt-jni/simple/build.sbt
diff options
context:
space:
mode:
authorJakob Odersky <jakob@odersky.com>2016-05-02 05:19:07 -0700
committerJakob Odersky <jakob@odersky.com>2016-05-11 11:17:09 -0700
commit791cb363b77332e3abdf4039102dfcdb863ce6c3 (patch)
tree09ff5d807a1407abedade57b692204ceac3f3280 /plugin/src/sbt-test/sbt-jni/simple/build.sbt
parent49563ee13599b0cb1add27b24446677a13b1f563 (diff)
downloadsbt-jni-791cb363b77332e3abdf4039102dfcdb863ce6c3.tar.gz
sbt-jni-791cb363b77332e3abdf4039102dfcdb863ce6c3.tar.bz2
sbt-jni-791cb363b77332e3abdf4039102dfcdb863ce6c3.zip
Use macro annotation to load native library
This also removes the need for third projects to depend on a "loader library".
Diffstat (limited to 'plugin/src/sbt-test/sbt-jni/simple/build.sbt')
-rw-r--r--plugin/src/sbt-test/sbt-jni/simple/build.sbt12
1 files changed, 12 insertions, 0 deletions
diff --git a/plugin/src/sbt-test/sbt-jni/simple/build.sbt b/plugin/src/sbt-test/sbt-jni/simple/build.sbt
new file mode 100644
index 0000000..e324d5a
--- /dev/null
+++ b/plugin/src/sbt-test/sbt-jni/simple/build.sbt
@@ -0,0 +1,12 @@
+ivyLoggingLevel := UpdateLogging.Quiet
+
+lazy val root = (project in file(".")).
+ aggregate(core, native)
+
+lazy val core = (project in file("core")).
+ settings(target in javah := (sourceDirectory in nativeCompile in native).value / "include").
+ dependsOn(native % Runtime)
+
+lazy val native = (project in file("native")).
+ settings(sourceDirectory in nativeCompile := sourceDirectory.value).
+ enablePlugins(JniNative)