@@ -7,6 +7,10 @@ _**Contents**_
7
7
* [ Debugging and Optimization] ( #debugging-and-optimization )
8
8
* [ Googletest Integration] ( #googletest-integration )
9
9
* [ Javascript Encoder/Decoder] ( #javascript-encoderdecoder )
10
+ * [ WebAssembly Decoder] ( #webassembly-decoder )
11
+ * [ WebAssembly Mesh Only Decoder] ( #webassembly-mesh-only-decoder )
12
+ * [ WebAssembly Point Cloud Only Decoder] ( #webassembly-point-cloud-only-decoder )
13
+ * [ iOS Builds] ( #ios-builds )
10
14
* [ Android Studio Project Integration] ( #android-studio-project-integration )
11
15
* [ Native Android Builds] ( #native-android-builds )
12
16
* [ vcpkg] ( #vcpkg )
@@ -52,16 +56,16 @@ Windows
52
56
-------
53
57
54
58
On a Windows box you would run the following command to generate Visual Studio
55
- 2017 projects:
59
+ 2019 projects:
56
60
57
61
~~~~~ bash
58
- C:\U sers\n obody> cmake ../ -G " Visual Studio 15 2017 "
62
+ C:\U sers\n obody> cmake ../ -G " Visual Studio 16 2019 " -A Win32
59
63
~~~~~
60
64
61
- To generate 64-bit Windows Visual Studio 2017 projects:
65
+ To generate 64-bit Windows Visual Studio 2019 projects:
62
66
63
67
~~~~~ bash
64
- C:\U sers\n obody> cmake ../ -G " Visual Studio 15 2017 Win64 "
68
+ C:\U sers\n obody> cmake ../ -G " Visual Studio 16 2019 " -A x64
65
69
~~~~~
66
70
67
71
@@ -85,49 +89,42 @@ $ cmake ../
85
89
A makefile using release (optimized) flags is produced like this:
86
90
87
91
~~~~~ bash
88
- $ cmake ../ -DCMAKE_BUILD_TYPE=release
92
+ $ cmake ../ -DCMAKE_BUILD_TYPE=Release
89
93
~~~~~
90
94
91
95
A release build with debug info can be produced as well:
92
96
93
97
~~~~~ bash
94
- $ cmake ../ -DCMAKE_BUILD_TYPE=relwithdebinfo
98
+ $ cmake ../ -DCMAKE_BUILD_TYPE=RelWithDebInfo
95
99
~~~~~
96
100
97
101
And your standard debug build will be produced using:
98
102
99
103
~~~~~ bash
100
- $ cmake ../ -DCMAKE_BUILD_TYPE=debug
104
+ $ cmake ../ -DCMAKE_BUILD_TYPE=Debug
101
105
~~~~~
102
106
103
107
To enable the use of sanitizers when the compiler in use supports them, set the
104
108
sanitizer type when running CMake:
105
109
106
110
~~~~~ bash
107
- $ cmake ../ -DSANITIZE =address
111
+ $ cmake ../ -DDRACO_SANITIZE =address
108
112
~~~~~
109
113
110
114
Googletest Integration
111
115
----------------------
112
116
113
117
Draco includes testing support built using Googletest. To enable Googletest unit
114
- test support the ENABLE_TESTS cmake variable must be turned on at cmake
118
+ test support the DRACO_TESTS cmake variable must be turned on at cmake
115
119
generation time:
116
120
117
121
~~~~~ bash
118
- $ cmake ../ -DENABLE_TESTS =ON
122
+ $ cmake ../ -DDRACO_TESTS =ON
119
123
~~~~~
120
124
121
- When cmake is used as shown in the above example the Draco cmake file assumes
122
- that the Googletest source directory is a sibling of the Draco repository. To
123
- change the location to something else use the GTEST_SOURCE_DIR cmake variable:
124
-
125
- ~~~~~ bash
126
- $ cmake ../ -DENABLE_TESTS=ON -DGTEST_SOURCE_DIR=path/to/googletest
127
- ~~~~~
128
-
129
- To run the tests just execute ` draco_tests ` from your toolchain's build output
130
- directory.
125
+ When cmake is used as shown in the above example the googletest directory must
126
+ be a sibling of the Draco repository root directory. To run the tests execute
127
+ ` draco_tests ` from your build output directory.
131
128
132
129
WebAssembly Decoder
133
130
-------------------
@@ -144,7 +141,7 @@ $ export EMSCRIPTEN=/path/to/emscripten/tools/parent
144
141
145
142
# Emscripten.cmake can be found within your Emscripten installation directory,
146
143
# it should be the subdir: cmake/Modules/Platform/Emscripten.cmake
147
- $ cmake ../ -DCMAKE_TOOLCHAIN_FILE=/path/to/Emscripten.cmake -DENABLE_WASM =ON
144
+ $ cmake ../ -DCMAKE_TOOLCHAIN_FILE=/path/to/Emscripten.cmake -DDRACO_WASM =ON
148
145
149
146
# Build the WebAssembly decoder.
150
147
$ make
@@ -160,7 +157,7 @@ WebAssembly Mesh Only Decoder
160
157
~~~~~ bash
161
158
162
159
# cmake command line for mesh only WebAssembly decoder.
163
- $ cmake ../ -DCMAKE_TOOLCHAIN_FILE=/path/to/Emscripten.cmake -DENABLE_WASM =ON -DENABLE_POINT_CLOUD_COMPRESSION =OFF
160
+ $ cmake ../ -DCMAKE_TOOLCHAIN_FILE=/path/to/Emscripten.cmake -DDRACO_WASM =ON -DDRACO_POINT_CLOUD_COMPRESSION =OFF
164
161
165
162
~~~~~
166
163
@@ -170,7 +167,7 @@ WebAssembly Point Cloud Only Decoder
170
167
~~~~~ bash
171
168
172
169
# cmake command line for point cloud only WebAssembly decoder.
173
- $ cmake ../ -DCMAKE_TOOLCHAIN_FILE=/path/to/Emscripten.cmake -DENABLE_WASM =ON -DENABLE_MESH_COMPRESSION =OFF
170
+ $ cmake ../ -DCMAKE_TOOLCHAIN_FILE=/path/to/Emscripten.cmake -DDRACO_WASM =ON -DDRACO_MESH_COMPRESSION =OFF
174
171
175
172
~~~~~
176
173
@@ -199,8 +196,7 @@ $ make
199
196
200
197
iOS Builds
201
198
---------------------
202
- To build Draco for different iOS architectures and simulators for iphone and the simulators
203
-
199
+ These are the basic commands needed to build Draco for iOS targets.
204
200
~~~~~ bash
205
201
206
202
# arm64
@@ -220,7 +216,8 @@ $ cmake ../ -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/i386-ios.cmake
220
216
$ make
221
217
~~~~~~
222
218
223
- After building the tools they can be merged into fat lib and used in Iphone applications.
219
+ After building for each target the libraries can be merged into a single
220
+ universal/fat library using lipo, and then used in iOS applications.
224
221
225
222
226
223
Native Android Builds
@@ -230,24 +227,13 @@ It's sometimes useful to build Draco command line tools and run them directly on
230
227
Android devices via adb.
231
228
232
229
~~~~~ bash
233
- # All targets require CMAKE_ANDROID_NDK. It must be set in the environment.
234
- $ export CMAKE_ANDROID_NDK=path/to/ndk
235
-
236
- # arm
237
- $ cmake ../ -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/armv7-android-ndk-libcpp.cmake
230
+ # This example is for armeabi-v7a.
231
+ $ cmake ../ -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/android.cmake \
232
+ -DDRACO_ANDROID_NDK_PATH=path/to/ndk -DANDROID_ABI=armeabi-v7a
238
233
$ make
239
234
240
- # arm64
241
- $ cmake ../ -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/arm64-android-ndk-libcpp.cmake
242
- $ make
243
-
244
- # x86
245
- $ cmake ../ -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/x86-android-ndk-libcpp.cmake
246
- $ make
247
-
248
- # x86_64
249
- $ cmake ../ -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/x86_64-android-ndk-libcpp.cmake
250
- $ make
235
+ # See the android.cmake toolchain file for additional ANDROID_ABI options and
236
+ # other configurable Android variables.
251
237
~~~~~
252
238
253
239
After building the tools they can be moved to an android device via the use of
@@ -300,12 +286,16 @@ To add Draco to your project:
300
286
301
287
vcpkg
302
288
---------------------
303
- You can download and install Draco using the [vcpkg](https://github.com/Microsoft/vcpkg/) dependency manager:
289
+ You can download and install Draco using the
290
+ [vcpkg](https://github.com/Microsoft/vcpkg/) dependency manager:
304
291
305
292
git clone https://github.com/Microsoft/vcpkg.git
306
293
cd vcpkg
307
294
./bootstrap-vcpkg.sh
308
295
./vcpkg integrate install
309
296
vcpkg install draco
310
297
311
- The Draco port in vcpkg is kept up to date by Microsoft team members and community contributors. If the version is out of date, please [create an issue or pull request](https://github.com/Microsoft/vcpkg) on the vcpkg repository.
298
+ The Draco port in vcpkg is kept up to date by Microsoft team members and
299
+ community contributors. If the version is out of date, please
300
+ [create an issue or pull request](https://github.com/Microsoft/vcpkg) on the
301
+ vcpkg repository.
0 commit comments