aboutsummaryrefslogtreecommitdiff
path: root/samples/basic/build.sbt
blob: 7f5bedd941980402e3585ace3e7331dcda065519 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
val commonSettings = Seq(
  scalaVersion := "2.11.7",
  organization := "ch.jodersky"
)

lazy val root = Project(
  id = "root",
  base = file("."),
  aggregate = Seq(core, native)
)

lazy val core = Project(
  id = "basic-core",
  base = file("basic-core"),
  settings = commonSettings ++ Seq(
    target in javah in Compile := (sourceDirectory in native).value / "include"
  ),
  dependencies = Seq(
    native % Runtime
  )
).enablePlugins(JniLoading)

lazy val native = Project(
  id = "basic-native",
  base = file("basic-native"),
  settings = commonSettings ++ Seq(
    //enableNativeCompilation in Compile := false,
    sourceDirectory in nativeCompile in Compile := sourceDirectory.value,
    nativeLibraryPath in Compile := "/ch/jodersky/jni/basic/native"
  )
).enablePlugins(JniNative)