Commit 952d74f
authored
Add KTX_FEATURE_JS option controlling whether
(Reopening #1072, now targeting `main`)
Adds a new CMake option called `KTX_FEATURE_JS`. It defaults to ON, but
when set to OFF, `ktx_js` and `ktx_js_read` are not built, even under
Emscripten.
My use-case for this is compiling [Cesium for
Unity](https://github.com/CesiumGS/cesium-unity) for the web. Compiling
Unity applications to WebAssembly requires using Unity's version of
Emscripten, which is quite old (v3.1.39), and is not able to compile
`ktx_js` successfully. This isn't really worth fixing because the
JavaScript bindings aren't used in this context anyway. KTX
functionality is only called from Emscripten'd native code, never from
regular JS code.
So with this low-impact PR, it's easy to disable this unnecessary part
of the KTX software suite in order to get a successful build.
The slightly bigger picture here is to then expose this via a vcpkg
feature flag.ktx_js[_read] are built. (#1073)1 parent 6765255 commit 952d74f
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
| |||
243 | 244 | | |
244 | 245 | | |
245 | 246 | | |
246 | | - | |
| 247 | + | |
247 | 248 | | |
248 | 249 | | |
249 | 250 | | |
| |||
0 commit comments