-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBUCK
More file actions
91 lines (84 loc) · 1.53 KB
/
Copy pathBUCK
File metadata and controls
91 lines (84 loc) · 1.53 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
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
# constants
COMPATIBLE_WITH = [
"config//os:macos",
"config//os:linux",
"config//os:windows",
]
PYTHON_EXE = "python3"
# cxx
cxx_binary(
name="app",
compatible_with=COMPATIBLE_WITH,
srcs=[
"cxx/app.cpp",
],
include_directories=[
".",
],
compiler_flags=[
"-g",
],
link_style = "static",
deps=[
"//deps:glad",
"//deps:glfw",
],
)
cxx_test(
name="test",
compatible_with=COMPATIBLE_WITH,
link_style="static",
srcs=["cxx/test.cpp"],
deps=[
"//deps:gtest",
"//deps:miniaudio",
"//deps:glfw",
],
resources = glob(["resources/*"]),
)
# python
python_library(
name="py_app_library",
compatible_with=COMPATIBLE_WITH,
srcs=["py/app.py"],
)
python_binary(
name="py_app",
compatible_with=COMPATIBLE_WITH,
main_module="py.app",
deps=[
":py_app_library",
":py_install_venv",
],
)
python_test(
name="py_test",
compatible_with=COMPATIBLE_WITH,
srcs=[
"py/test.py",
],
deps=[
"//deps:gtest",
],
)
# genrules
sh_binary(
name="install_venv",
main="scripts/installvenv.sh",
)
genrule(
name="py_install_venv",
compatible_with=COMPATIBLE_WITH,
out=".",
cmd="$(exe :install_venv)" + " " + PYTHON_EXE + " venv requirements.txt",
)
sh_binary(
name="uninstall_venv",
main="scripts/uninstallvenv.sh",
)
genrule(
name="py_uninstall_venv",
compatible_with=COMPATIBLE_WITH,
out=".",
cmd="$(exe :uninstall_venv) venv",
)