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

Request: Emscripten/wasm support #60

Closed
jnickg opened this issue Feb 14, 2024 · 4 comments · Fixed by #101
Closed

Request: Emscripten/wasm support #60

jnickg opened this issue Feb 14, 2024 · 4 comments · Fixed by #101

Comments

@jnickg
Copy link

jnickg commented Feb 14, 2024

What the title says: can webassembly support be added to CMakeLists.txt, so users building with an Emscripten toolchain can integrate this?

There are some clear architecture & platform checks at the beginning of the top-level CMakeLists.txt file, which prevent this project from building via Emscripten. If I try to hack past those most basic checks, there are also errors related to libjpeg-turbo.

I already have libjpeg-turbo building for emscripten in my build system, so these issues can be worked around.

@ram-mohan
Copy link
Contributor

I have made some changes to cmakelists.txt and got the build working, can you please try this,
#61

@jnickg
Copy link
Author

jnickg commented Feb 21, 2024

Sorry for not replying sooner -- I will take a look at this in the next day or two and get back. Thanks

@jnickg
Copy link
Author

jnickg commented Feb 22, 2024

Looks like I was able to build this using Emscripten, though I had to apply this change to consume it in the parent project in which I'm working.

This test didn't try to do anything useful with libultrahdr, but it did ensure it was compiled in, headers could be included, and functions called.

Thanks for the support on this -- would it be helpful if I opened a PR into your branch with the above changes?

@ram-mohan
Copy link
Contributor

If it fixes a problem, please issue a pull request, thank you.

ram-mohan added a commit to ittiam-systems/libultrahdr that referenced this issue Apr 6, 2024
mkdir build && cd build
emcmake cmake ../
cmake --build ./

Successfully builds all targets with Emscripten toolchain. But,
currently no bindings are present to really make use of the
libraries that were built.

fixes google#60
DichenZhang1 pushed a commit that referenced this issue Apr 9, 2024
mkdir build && cd build
emcmake cmake ../
cmake --build ./

Successfully builds all targets with Emscripten toolchain. But,
currently no bindings are present to really make use of the
libraries that were built.

fixes #60
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

Successfully merging a pull request may close this issue.

2 participants