-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathlibs.gradle
53 lines (46 loc) · 1.82 KB
/
libs.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
44
45
46
47
48
49
50
51
52
53
model {
repositories {
libs(PrebuiltLibraries) {
libressl {
headers.srcDir "libs/libressl/include"
binaries.withType(StaticLibraryBinary) {
staticLibraryFile = file("libs/libressl/" + getStaticLibForPlatform(targetPlatform, "crypto"))
}
}
gcrypt {
headers.srcDir "libs/gcrypt/include"
binaries.withType(StaticLibraryBinary) {
staticLibraryFile = file("libs/gcrypt/" + getStaticLibForPlatform(targetPlatform, "gcrypt"))
}
}
gpgError {
binaries.withType(StaticLibraryBinary) {
staticLibraryFile = file("libs/gcrypt/" + getStaticLibForPlatform(targetPlatform, "gpg-error"))
}
}
cppcrypto {
headers.srcDir "libs/cppcrypto/include"
binaries.withType(StaticLibraryBinary) {
staticLibraryFile = file("libs/cppcrypto/" + getStaticLibForPlatform(targetPlatform, "cppcrypto"))
}
}
bee2 {
headers.srcDir "libs/bee2/include"
binaries.withType(StaticLibraryBinary) {
staticLibraryFile = file("libs/bee2/" + getStaticLibForPlatform(targetPlatform, "bee2"))
}
}
}
}
}
def getStaticLibForPlatform(Platform platform, String name) {
def platformName = "${platform.operatingSystem.name}_${platform.architecture.name}"
if (platform.operatingSystem.windows) {
if (name == "gcrypt" || name == "gpg-error") {
return "${platformName}/lib${name}.dll.a"
}
return "${platformName}/lib${name}.lib"
} else {
return "${platformName}/lib${name}.a"
}
}