Skip to content

Commit

Permalink
Fix build.sbt
Browse files Browse the repository at this point in the history
  • Loading branch information
Dolu1990 committed Feb 15, 2025
1 parent c294426 commit a5c7780
Showing 1 changed file with 9 additions and 23 deletions.
32 changes: 9 additions & 23 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
val spinalVersion = "dev"
val spinalHdlFromSource = sys.env.getOrElse("SPINALHDL_FROM_SOURCE", "1") == "1"
val spinalHdlPathEnabled = sys.env.contains("SPINALHDL_PATH")
val spinalHdlPath = sys.env.getOrElse("SPINALHDL_PATH", "./ext/SpinalHDL")

def rootGen() = {
var ret = (project in file(".")).settings(
lazy val root = (project in file(".")).
settings(
inThisBuild(List(
organization := "com.github.spinalhdl",
scalaVersion := "2.12.18",
version := "2.0.0"
)),
scalacOptions += s"-Xplugin:${new File((if(spinalHdlPathEnabled) spinalHdlPath else baseDirectory.value.getAbsolutePath + s"/ext/SpinalHDL") + s"/idslplugin/target/scala-2.12/spinalhdl-idsl-plugin_2.12-$spinalVersion.jar")}",
scalacOptions += s"-Xplugin:${new File(baseDirectory.value + s"/../SpinalHDL/idslplugin/target/scala-2.12/spinalhdl-idsl-plugin_2.12-$spinalVersion.jar")}",
scalacOptions += s"-Xplugin-require:idsl-plugin",
scalacOptions += "-language:reflectiveCalls",
libraryDependencies ++= Seq(
Expand All @@ -19,25 +16,14 @@ def rootGen() = {
"net.fornwall" % "jelf" % "0.7.0",
"org.scream3r" % "jssc" % "2.8.0"
),
libraryDependencies ++= (if (spinalHdlFromSource) Nil else Seq(
"com.github.spinalhdl" %% "spinalhdl-core" % spinalVersion,
"com.github.spinalhdl" %% "spinalhdl-lib" % spinalVersion,
compilerPlugin("com.github.spinalhdl" %% "spinalhdl-idsl-plugin" % spinalVersion)
)),
Compile / unmanagedSourceDirectories += baseDirectory.value / "ext/rvls/bindings/jni",
Compile / unmanagedSourceDirectories += baseDirectory.value / "ext/rvls/bindings/spinal",
name := "VexiiRiscv"
)
if(spinalHdlFromSource){
ret = ret.dependsOn(spinalHdlIdslPlugin, spinalHdlSim, spinalHdlCore, spinalHdlLib)
}
ret
}
).dependsOn(spinalHdlIdslPlugin, spinalHdlSim,spinalHdlCore,spinalHdlLib)

lazy val root = rootGen()
lazy val spinalHdlIdslPlugin = ProjectRef(file(spinalHdlPath), "idslplugin")
lazy val spinalHdlSim = ProjectRef(file(spinalHdlPath), "sim")
lazy val spinalHdlCore = ProjectRef(file(spinalHdlPath), "core")
lazy val spinalHdlLib = ProjectRef(file(spinalHdlPath), "lib")
lazy val spinalHdlIdslPlugin = ProjectRef(file("../SpinalHDL"), "idslplugin")
lazy val spinalHdlSim = ProjectRef(file("../SpinalHDL"), "sim")
lazy val spinalHdlCore = ProjectRef(file("../SpinalHDL"), "core")
lazy val spinalHdlLib = ProjectRef(file("../SpinalHDL"), "lib")

fork := true
fork := true

0 comments on commit a5c7780

Please sign in to comment.