-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.sbt
156 lines (135 loc) · 4.7 KB
/
build.sbt
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
organization in ThisBuild := "de.surfice"
version in ThisBuild := "0.0.1-SNAPSHOT"
scalaVersion in ThisBuild := "2.11.12"
val Version = new {
val swog = "0.1.0-SNAPSHOT"
val smacrotools = "0.0.8"
val utest = "0.6.8-SNAPSHOT"
}
lazy val commonSettings = Seq(
scalacOptions ++= Seq("-deprecation","-unchecked","-feature","-language:implicitConversions","-Xlint","-Ybreak-cycles"),
addCompilerPlugin("org.scalamacros" % "paradise" % "2.1.0" cross CrossVersion.full),
libraryDependencies ++= Seq(
"de.surfice" %%% "swog-cxx" % Version.swog,
"com.lihaoyi" %%% "utest" % Version.utest % "test"
),
resolvers += Opts.resolver.sonatypeSnapshots,
testFrameworks += new TestFramework("utest.runner.Framework")
)
lazy val moduleSettings = commonSettings ++ Seq(
nativeLinkStubs := true,
nbhPkgConfigModules ++= Seq("Qt5Widgets","Qt5Network"),
nbhCxxCXXFlags := "-std=c++11 -g" +: nbhPkgConfigCFlags.value,
nbhCxxLDFlags := nbhPkgConfigLinkingFlags.value :+ "-g"
)
lazy val qt5 = project.in(file("."))
.enablePlugins(ScalaNativePlugin)
.aggregate(macros,core,network,gui,widgets,uitools,multimedia,multimediawidgets)
.settings(commonSettings ++ dontPublish:_*)
.settings(
name := "scalanative-qt5",
description := "ScalaNative bindings for Qt5"
)
lazy val macros = project
.enablePlugins(ScalaNativePlugin)
.settings(commonSettings ++ publishingSettings: _*)
.settings(
name := "scalanative-qt5-macros"
)
lazy val core = project
.enablePlugins(ScalaNativePlugin,NBHAutoPlugin,NBHCxxPlugin,NBHPkgConfigPlugin)
.dependsOn(macros)
.settings(moduleSettings ++ publishingSettings: _*)
.settings(
name := "scalanative-qt5-core"
)
lazy val network = project
.enablePlugins(ScalaNativePlugin,NBHAutoPlugin,NBHCxxPlugin,NBHPkgConfigPlugin)
.dependsOn(core)
.settings(moduleSettings ++ publishingSettings: _*)
.settings(
name := "scalanative-qt5-network"
)
lazy val gui = project
.enablePlugins(ScalaNativePlugin,NBHAutoPlugin,NBHCxxPlugin,NBHPkgConfigPlugin)
.dependsOn(core)
.settings(moduleSettings ++ publishingSettings: _*)
.settings(
name := "scalanative-qt5-gui"
)
lazy val widgets = project
.enablePlugins(ScalaNativePlugin,NBHAutoPlugin,NBHCxxPlugin,NBHPkgConfigPlugin)
.dependsOn(gui)
.settings(moduleSettings ++ publishingSettings: _*)
.settings(
name := "scalanative-qt5-widgets"
)
lazy val uitools = project
.enablePlugins(ScalaNativePlugin,NBHAutoPlugin,NBHCxxPlugin,NBHPkgConfigPlugin)
.dependsOn(widgets)
.settings(moduleSettings ++ publishingSettings: _*)
.settings(
name := "scalanative-qt5-uitools"
)
lazy val multimedia = project
.enablePlugins(ScalaNativePlugin,NBHAutoPlugin,NBHCxxPlugin,NBHPkgConfigPlugin)
.dependsOn(core)
.settings(moduleSettings ++ publishingSettings: _*)
.settings(
name := "scalanative-qt5-multimedia"
)
lazy val multimediawidgets = project
.enablePlugins(ScalaNativePlugin,NBHAutoPlugin,NBHCxxPlugin,NBHPkgConfigPlugin)
.dependsOn(widgets,multimedia)
.settings(moduleSettings ++ publishingSettings: _*)
.settings(
name := "scalanative-qt5-multimediawidgets"
)
lazy val demo = project
.enablePlugins(ScalaNativePlugin,NBHAutoPlugin,NBHCxxPlugin,NBHPkgConfigPlugin)
.dependsOn(widgets,uitools,multimediawidgets)
.settings(moduleSettings ++ dontPublish: _*)
.settings(
nativeLinkStubs := true,
nbhPkgConfigModules ++= Seq("Qt5Widgets","Qt5UiTools","Qt5MultimediaWidgets"),
nbhCxxCXXFlags := "-std=c++11 -g" +: nbhPkgConfigCFlags.value,
nbhCxxLDFlags := nbhPkgConfigLinkingFlags.value
)
lazy val dontPublish = Seq(
publish := {},
publishLocal := {},
com.typesafe.sbt.pgp.PgpKeys.publishSigned := {},
com.typesafe.sbt.pgp.PgpKeys.publishLocalSigned := {},
publishArtifact := false,
publishTo := Some(Resolver.file("Unused transient repository",file("target/unusedrepo")))
)
lazy val publishingSettings = Seq(
publishMavenStyle := true,
publishTo := {
val nexus = "https://oss.sonatype.org/"
if (isSnapshot.value)
Some("snapshots" at nexus + "content/repositories/snapshots")
else
Some("releases" at nexus + "service/local/staging/deploy/maven2")
},
pomExtra := (
<url>https://github.com/jokade/scalanative-qt5</url>
<licenses>
<license>
<name>MIT License</name>
<url>http://www.opensource.org/licenses/mit-license.php</url>
</license>
</licenses>
<scm>
<url>[email protected]:jokade/scalanative-qt5</url>
<connection>scm:git:[email protected]:jokade/scalanative-qt5.git</connection>
</scm>
<developers>
<developer>
<id>jokade</id>
<name>Johannes Kastner</name>
<email>[email protected]</email>
</developer>
</developers>
)
)