Skip to content

Commit

Permalink
modules: Add -s USE_SDL=2 to linker flags in FindMagnum.cmake
Browse files Browse the repository at this point in the history
Signed-off-by: Squareys <squareys@googlemail.com>
  • Loading branch information
Squareys committed Oct 4, 2017
1 parent 5f3ff71 commit 628314b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions modules/FindMagnum.cmake
Expand Up @@ -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)
Expand Down

0 comments on commit 628314b

Please sign in to comment.