-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathbuild.sbt
More file actions
81 lines (69 loc) · 2.36 KB
/
build.sbt
File metadata and controls
81 lines (69 loc) · 2.36 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
import org.nlogo.build.{ NetLogoExtension, ExtensionDocumentationPlugin}
enablePlugins(NetLogoExtension, ExtensionDocumentationPlugin)
name := "vid"
version := "1.3.2"
isSnapshot := true
organization := "org.nlogo"
scalaVersion := "3.7.0"
scalacOptions ++= Seq(
"-deprecation",
"-unchecked",
"-feature",
"-encoding", "us-ascii",
"-Xfatal-warnings",
"-release", "11"
)
netLogoClassManager := "org.nlogo.extensions.vid.VidExtension"
netLogoVersion := "7.0.0-2486d1e"
netLogoZipExtras ++= Seq(baseDirectory.value / "README.md")
// settings for the `sbt-javacpp` sbt plugin
javaCppVersion := "1.5.7"
// opencv depends on openblas so get those platform-specific binaries, too
javaCppPresetLibs ++= Seq("opencv" -> "4.5.5", "openblas" -> "0.3.19")
// only include the supported NetLogo platforms
javaCppPlatform := {
(System.getProperty("os.name"), System.getProperty("os.arch")) match {
case (name, arch) if name.startsWith("Linux") =>
if (arch.contains("x86")) {
Seq("linux-x86")
} else {
Seq("linux-x86_64")
}
case (name, arch) if name.startsWith("Mac") =>
if (arch.contains("aarch64")) {
Seq("macosx-arm64")
} else {
Seq("macosx-x86_64")
}
case (name, arch) if name.startsWith("Windows") =>
if (arch.contains("x86")) {
Seq("windows-x86")
} else {
Seq("windows-x86_64")
}
case _ => throw new Exception("Unknown platform!")
}
}
libraryDependencies ++= Seq(
// only include `javacv` and not `javacv-platform` as we manually specify the native libraries
// throught the `sbt-javacpp` sbt plugin
"org.bytedeco" % "javacv" % "1.5.7"
, "org.jcodec" % "jcodec" % "0.1.9"
, "org.jcodec" % "jcodec-javase" % "0.1.9"
)
// necessary for testing camera functionality.
// See https://groups.google.com/forum/#!topic/nativelibs4java/WNmOZPknRiU
Test / fork := true
// Add JavaFX dependencies
val javaFXVersion = "21"
libraryDependencies ++= {
// Determine OS version of JavaFX binaries
lazy val osName = System.getProperty("os.name") match {
case n if n.startsWith("Linux") => "linux"
case n if n.startsWith("Mac") => "mac"
case n if n.startsWith("Windows") => "win"
case _ => throw new Exception("Unknown platform!")
}
Seq("base", "controls", "media", "swing")
.map(m => "org.openjfx" % s"javafx-$m" % javaFXVersion classifier osName)
}