My step by step guides for SDL3 to build for Android and WebAssembly

How to copy a configured project for WebAssembly

I had a problem with sdl3-sample. Every time when I start a new project I make:

  • git clone https://github.com/Ravbug/sdl3-sample --depth=1 --recurse-submodules
  • running config-web-win from emcmdprompt.bat

It requires 13 minutes. I cannot just copy paste the old project because when I make mingw32-make in the copied project it build the previous one because it keeps the absolute paths of the previous project.

I don’t think that it is the best solution but it works. I have found the previous absolute project path in two files: build/web/SDL/Makefile and build/web/CMakeCache.txt. In the Makefile file I have replaced CMAKE_SOURCE_DIR and CMAKE_BINARY_DIR with a new project name. In the CMakeCache.txt I have found 10 lines to rename.