-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvcpkg.just
44 lines (37 loc) · 1.16 KB
/
vcpkg.just
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
# detect the vcpkg triplet based on the system information
windows_triplet := "x64-windows-static"
VCPKG_DEFAULT_TRIPLET := if os_family() == "windows" {
windows_triplet
} else if os() == "macos" {
if arch() == "aarch64" {
"arm64-osx-homebrew"
} else { "x64-osx-homebrew" }
} else {
"x64-linux"
}
cmake_preset := if os_family() == "windows" {
"windows"
} else if os() == "macos" {
if arch() == "aarch64" {
"mac-arm"
} else { "mac-intel" }
} else {
"linux"
}
VCPKG_DEFAULT_HOST_TRIPLET := VCPKG_DEFAULT_TRIPLET
vcpkg_root := env('VCPKG_ROOT', join(justfile_directory(), "..", "vcpkg"))
git_status_clean:
git diff --quiet --exit-code
[windows]
clear_cache_vs:
rm '{{justfile_directory()}}/build/visualstudio/CMakeCache.txt'
rm -rf '{{justfile_directory()}}/build/visualstudio/CMakeFiles'
clear_cache:
rm '{{justfile_directory()}}/build/cmake/CMakeCache.txt'
rm -rf '{{justfile_directory()}}/build/cmake/CMakeFiles'
# will invoke just build_dist but first activates the visual studio environment
[windows]
dist:
cmd.exe /C '{{source_directory()}}/dist.bat' '{{justfile_directory()}}'
[unix]
dist: build_dist