Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake flag to build draco webassembly libraries which can be linked to WASM at a later build stage. #407

Closed
DrJohnDale opened this issue Jun 1, 2018 · 3 comments
Assignees

Comments

@DrJohnDale
Copy link

We are using draco in out cpp side and our web side and have recently started to use webassembly with emscripten to to build our cpp so we can use it in the browser.

For this we need to link to the draco libraries but the default emscripten build does not produce the libdraco, libdracodec and libdracoenc libraries. We currently edit the CMakeList.txt entry at line 607 from:

#
# Draco targets.
#
if (EMSCRIPTEN)

to

#
# Draco targets.
#
if (NO)

So that the emscripten build produces the libraries the same way the cpp build does.

What would be really useful for us would be a CMake flag that if it were set and emscripten was being used we could build only the three library files.

Cheers

@tomfinegan tomfinegan self-assigned this Jun 1, 2018
tomfinegan added a commit that referenced this issue Jun 1, 2018
Downstream users sometimes need the standard Draco library targets,
even when building in Emscripten. Add the flag ENABLE_JS_GLUE, which
defaults to ON. When turned OFF, the standard Draco library targets
will still be built within an Emscripten build.

Also do some whitespace clean up while working in CMakeLists.txt.

#407
@tomfinegan
Copy link
Contributor

#410 might take care of what you're looking for-- please give it a try.

@DrJohnDale
Copy link
Author

Hi,

I tested the branch and it works perfectly.

Cheers.

@tomfinegan
Copy link
Contributor

Thanks for testing! Closing.

danielgronlund pushed a commit to danielgronlund/draco that referenced this issue Aug 22, 2024
Downstream users sometimes need the standard Draco library targets,
even when building in Emscripten. Add the flag ENABLE_JS_GLUE, which
defaults to ON. When turned OFF, the standard Draco library targets
will still be built within an Emscripten build.

Also do some whitespace clean up while working in CMakeLists.txt.

google#407
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants