bv7dev / wgpu-lab

Library for rapid prototyping of native WebGPU Apps in C++ using Dawn
https://github.com/bv7dev/wgpu-lab
MIT License
17 stars 1 forks source link

How to build? #2

Open Germ210 opened 6 days ago

Germ210 commented 6 days ago

Hello bv7dev, I have contacted you on reddit but in case you did not see, I wish to contribute to the project some time in the future, but instructions are unclear on how to build. I wish to use all extras such as tinyGLTF

bv7dev commented 6 days ago

Hey Germ, thank you for reaching out. I've updated the readme to hopefully make it more clear. Currently I don't have the time to improve the build system.

Would be great if you could help me with that!

My idea so far is to do it similarly like dawn manages it's dependencies. It has a python script called fetch_dependencies.py to automate that.

We could also add a script with the same name into the root of wgpu-lab. It's task would be to simply clone the three dependencies into wgpu-lab/libs.

Then we could somehow instuct CMake to automatically call this script if dependencies haven't been downloaded yet. I know that this is possible, because dawn's python script also get's called automatically from CMake.

For the webgpu_dawn.dll we could have a script create a hard-link to it into the build directory.

I don't know how we can statically build dawn. Probably it's some variable we have to define for the dawn build or something like that.

Germ210 commented 6 days ago

Yeah, thank you so much

bv7dev commented 1 day ago

Let's have this issue open until the build system has been simplified.

Germ210 commented 15 hours ago

Alright. Maybe adding dawn as a git submodule could make it easier to build