-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle
More file actions
59 lines (55 loc) · 1.55 KB
/
build.gradle
File metadata and controls
59 lines (55 loc) · 1.55 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
plugins {
id "cpp"
id "google-test-test-suite"
id "edu.wpi.first.GradleRIO" version "2022.3.1"
}
model {
repositories {
libs(PrebuiltLibraries) {
zlib {
binaries.withType(SharedLibraryBinarySpec) {
linker.args ("-L/Users/Public/robotlib2020",'-lz')
}
}
}
}
components {
CORERobotLib(NativeLibrarySpec) {
targetPlatform wpi.platforms.roborio
sources.cpp {
source {
srcDir "src"
srcDir "3rdparty/seasocks/src/main/c"
srcDir "3rdparty/seasocks/src/main/web"
include "**/*.cpp"
exclude "CORESimulation"
}
exportedHeaders {
srcDir "src"
srcDir "3rdparty/json/src/"
srcDir "3rdparty/zlib"
srcDir "3rdparty/seasocks/src/main/c"
}
}
binaries.withType(SharedLibraryBinarySpec) {
buildable = false
}
wpi.cpp.vendor.cpp(it)
wpi.cpp.deps.wpilib(it)
}
}
}
task copyToLibDir(type: Copy) {
from "build/libs/cORERobotLib/static"
into "lib"
}
build.finalizedBy copyToLibDir
def getPlatformPath(Platform platform) {
if (platform.operatingSystem.windows) {
return "Windows/amd64/"
} else if (platform.architecture.arm) {
return "Linux/arm/"
} else {
return "Linux/amd64/"
}
}