sdl2-cmake-scripts icon indicating copy to clipboard operation
sdl2-cmake-scripts copied to clipboard

Cannot build with threads in emscripten

Open rileylev opened this issue 5 years ago • 1 comments

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.

rileylev avatar Jun 14 '19 22:06 rileylev

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.

rileylev avatar Jun 14 '19 22:06 rileylev