sdl2-cmake-scripts
sdl2-cmake-scripts copied to clipboard
Cannot build with threads in emscripten
I cannot use find_package on emscripten because threads are not yet supported in the browser by default. There is a SDL2 port for emscripten without threads, though. I think adding && NOT EMSCRIPTEN where you check if apple is being used will fix the problem.
It seems like emscripten requires a very different approach to linking SDL2, so fixing threads is not enough. Maybe stub cmake files that set the build and link flags to contain "-s USE_SDL=2" is needed.