-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdriver.gradle
43 lines (36 loc) · 1.27 KB
/
driver.gradle
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
defineWpiUtilProperties()
defineHALProperties()
def driverSetupModel = { project ->
project.model {
components {
ctreextern(NativeLibrarySpec) {
targetPlatform 'arm'
setupDefines(project, binaries)
binaries.all {
tasks.withType(CppCompile) {
cppCompiler.args "-DNAMESPACED_WPILIB"
addUserLinks(linker, targetPlatform, false)
addHalLibraryLinks(it, linker, targetPlatform)
addWpiUtilLibraryLinks(it, linker, targetPlatform)
}
}
sources {
cpp {
source {
srcDirs = [driverSrc, driverLibrarySrc]
includes = ["**/*.cpp",]
}
exportedHeaders {
srcDirs = [driverInclude, driverLibraryInclude, halInclude, wpiUtilInclude]
includes = ['**/*.h']
}
}
}
}
}
}
}
apply plugin: 'cpp'
apply from: "${rootDir}/toolchains/arm.gradle"
driverSetupModel(project)
project.debugStripSetup()