Closed shrekshao closed 1 year ago
Interestingly @bitsauce and I tried to build on windows at the same time. I used cmake module and he used vcpkg to config glfw on windows. I cherry-picked some of his changes and added how to config glfw on win manually or using vcpkg to the README.md
I got
Not sure what compile flag changed. But just make
CreateSurface
returnwgpu::Surface
instead ofWGPUSurface
which is good anyway.The build and run work.
I added
cmake/modules/Findglfw3.cmake
to solve the cmakefind_package(glfw3)
issue and thencmake ../..
setup the project successfully.I tried build using Visual Studio 2019 and got some build error in main.cpp and in dawn. I never tried building dawn with VS anyway though.cmake ../.. -GNinja
complains about not setting cxx compiler. So I just stopped there. I don't have this build on windows.I used VS 2022 to open the sln generated by cmake and managed to build and run the demo.
(regards to https://github.com/kainino0x/webgpu-cross-platform-demo/pull/11#issuecomment-1354298071)