From c01961ba6b78c67060d51c3d494d91dded71c307 Mon Sep 17 00:00:00 2001 From: Squareys Date: Tue, 26 Sep 2017 09:22:36 +0200 Subject: [PATCH] modules: Add -s USE_SDL=2 to linker flags in FindMagnum.cmake Signed-off-by: Squareys --- modules/FindMagnum.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/FindMagnum.cmake b/modules/FindMagnum.cmake index ef58d203c..43997ff48 100644 --- a/modules/FindMagnum.cmake +++ b/modules/FindMagnum.cmake @@ -534,6 +534,10 @@ foreach(_component ${Magnum_FIND_COMPONENTS}) find_package(SDL2) set_property(TARGET Magnum::${_component} APPEND PROPERTY INTERFACE_LINK_LIBRARIES SDL2::SDL2) + if(CORRADE_TARGET_EMSCRIPTEN) + # TODO: give me INTERFACE_LINK_OPTIONS or something, please + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s USE_SDL=2") + endif() # (Windowless) GLX application dependencies elseif(_component STREQUAL GlxApplication OR _component STREQUAL WindowlessGlxApplication)