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
|
sh build.sh -h
Usage:
build.sh [options] <build_type1> [<build_type2> ...] [targets]
Options:
-h
Print this help message.
-a
Generate .tgz build archives, implies -i.
-c
Clean build directories.
-C
Clean build directories and revert android/ to a freshly sync'ed state.
All (and only) git-ignored files under android/ are deleted.
This is sometimes needed instead of -c (which still misses some clean steps).
-d
Enable matdbg.
-f
Always invoke CMake before incremental builds.
-g
Disable material optimization.
-i
Install build output
-m
Compile with make instead of ninja.
-p platform1,platform2,...
Where platformN is [desktop|android|ios|webgl|all].
Platform(s) to build, defaults to desktop.
Building for iOS will automatically perform a partial desktop build.
-q abi1,abi2,...
Where platformN is [armeabi-v7a|arm64-v8a|x86|x86_64|all].
ABIs to build when the platform is Android. Defaults to all.
-u
Run all unit tests, will trigger a debug build if needed.
-v
Exclude Vulkan support from the Android build.
-s
Add iOS simulator support to the iOS build.
-t
Enable SwiftShader support for Vulkan in desktop builds.
-e
Enable EGL on Linux support for desktop builds.
-l
Build arm64/x86_64 universal libraries.
For iOS, this builds universal binaries for devices and the simulator (implies -s).
For macOS, this builds universal binaries for both Apple silicon and Intel-based Macs.
-w
Build Web documents (compiles .md.html files to .html).
-k sample1,sample2,...
When building for Android, also build select sample APKs.
sampleN is an Android sample, e.g., sample-gltf-viewer.
This automatically performs a partial desktop build and install.
-b
Enable Address and Undefined Behavior Sanitizers (asan/ubsan) for debugging.
This is only for the desktop build.
Build types:
release
Release build only
debug
Debug build only
Targets:
Any target supported by the underlying build system
Examples:
Desktop release build:
$ ./build.sh release
Desktop debug and release builds:
$ ./build.sh debug release
Clean, desktop debug build and create archive of build artifacts:
$ ./build.sh -c -a debug
Android release build type:
$ ./build.sh -p android release
Desktop and Android release builds, with installation:
$ ./build.sh -p desktop,android -i release
Desktop matc target, release build:
$ ./build.sh release matc
Build gltf_viewer:
$ ./build.sh release gltf_viewer
|