-
-
Notifications
You must be signed in to change notification settings - Fork 40
/
Makefile.toml
73 lines (60 loc) · 2.16 KB
/
Makefile.toml
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
# Depends on https://github.com/sagiegurari/cargo-make - Install it with "cargo install cargo-make"
# After that you can run "cargo make build" or "cargo make build-release" to build the project
# Building
[tasks.build]
windows_alias = "build-windows"
linux_alias = "build-linux"
[tasks.build-windows]
dependencies = ["setup-vcpkg"]
env = { VCPKG_ROOT = "${CARGO_MAKE_WORKING_DIRECTORY}\\target\\vcpkg" }
command = "cargo"
args = ["build"]
[tasks.build-linux]
dependencies = ["setup-vcpkg"]
env = { VCPKG_ROOT = "${CARGO_MAKE_WORKING_DIRECTORY}/target/vcpkg" }
command = "cargo"
args = ["build"]
[tasks.build-release]
windows_alias = "build-release-windows"
linux_alias = "build-release-linux"
[tasks.build-release-windows]
dependencies = ["setup-vcpkg"]
env = { VCPKG_ROOT = "${CARGO_MAKE_WORKING_DIRECTORY}\\target\\vcpkg" }
command = "cargo"
args = ["build", "--release"]
[tasks.build-release-linux]
dependencies = ["setup-vcpkg"]
env = { VCPKG_ROOT = "${CARGO_MAKE_WORKING_DIRECTORY}/target/vcpkg" }
command = "cargo"
args = ["build", "--release"]
[tasks.setup-vcpkg]
command = "cargo"
args = ["vcpkg", "build"]
# Running
[tasks.run]
windows_alias = "run-windows"
linux_alias = "run-linux"
[tasks.run-windows]
env = { VCPKG_ROOT = "${CARGO_MAKE_WORKING_DIRECTORY}\\target\\vcpkg" }
script = '''
cls && cargo run --release
'''
[tasks.run-linux]
env = { VCPKG_ROOT = "${CARGO_MAKE_WORKING_DIRECTORY}/target/vcpkg" }
script = '''
clear && cargo build --release && ./target/release/legion-kb-rgb
'''
# Clippy
[tasks.clippy-all]
windows_alias = "clippy-all-windows"
linux_alias = "clippy-all-linux"
[tasks.clippy-all-windows]
env = { VCPKG_ROOT = "${CARGO_MAKE_WORKING_DIRECTORY}\\target\\vcpkg" }
script = '''
cls && cargo clippy -- -W clippy::pedantic -W clippy::nursery -A clippy::unreadable_literal -A clippy::too_many_lines -A clippy::items-after-statements -A clippy::module-name-repetitions
'''
[tasks.clippy-all-linux]
env = { VCPKG_ROOT = "${CARGO_MAKE_WORKING_DIRECTORY}/target/vcpkg" }
script = '''
clear && cargo clippy -- -W clippy::pedantic -W clippy::nursery -A clippy::unreadable_literal -A clippy::too_many_lines -A clippy::items-after-statements -A clippy::module-name-repetitions
'''