diff --git a/desktop_version/CMakeLists.txt b/desktop_version/CMakeLists.txt index 7405c122..111272e2 100644 --- a/desktop_version/CMakeLists.txt +++ b/desktop_version/CMakeLists.txt @@ -304,6 +304,10 @@ if(DEFINED SDL2_INCLUDE_DIRS AND DEFINED SDL2_LIBRARIES) message(STATUS "Using pre-defined SDL2 variables SDL2_INCLUDE_DIRS and SDL2_LIBRARIES") target_include_directories(VVVVVV SYSTEM PRIVATE "$") target_link_libraries(VVVVVV ${SDL2_LIBRARIES}) +elseif (EMSCRIPTEN) + message(STATUS "Using Emscripten SDL2") + target_compile_options(VVVVVV PUBLIC -sUSE_SDL=2 -sUSE_SDL_MIXER=2) + target_link_libraries(VVVVVV -sUSE_SDL=2 -sUSE_SDL_MIXER=2) else() # Only try to autodetect if both SDL2 variables aren't explicitly set find_package(SDL2 CONFIG)