forked from therecipe/qt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rpi.go
45 lines (38 loc) · 963 Bytes
/
rpi.go
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
package utils
import (
"os"
"path/filepath"
)
func QT_RPI() bool {
return os.Getenv("QT_RPI") == "true"
}
func RPI_COMPILER() string {
if name, ok := os.LookupEnv("RPI_COMPILER"); ok {
return name
}
return "arm-rpi-4.9.3-linux-gnueabihf"
}
func RPI_TOOLS_DIR() string {
if dir, ok := os.LookupEnv("RPI_TOOLS_DIR"); ok {
return filepath.Clean(dir)
}
return filepath.Join(os.Getenv("HOME"), "raspi/tools")
}
func RPI1_SYSROOT_DIR() string {
if dir, ok := os.LookupEnv("RPI1_SYSROOT_DIR"); ok {
return filepath.Clean(dir)
}
return filepath.Join(os.Getenv("HOME"), "raspi/sysroot")
}
func RPI2_SYSROOT_DIR() string {
if dir, ok := os.LookupEnv("RPI2_SYSROOT_DIR"); ok {
return filepath.Clean(dir)
}
return filepath.Join(os.Getenv("HOME"), "raspi/sysroot")
}
func RPI3_SYSROOT_DIR() string {
if dir, ok := os.LookupEnv("RPI3_SYSROOT_DIR"); ok {
return filepath.Clean(dir)
}
return filepath.Join(os.Getenv("HOME"), "raspi/sysroot")
}