diff --git a/doc/changelog.dox b/doc/changelog.dox index a199ba9bf..5b271f52a 100644 --- a/doc/changelog.dox +++ b/doc/changelog.dox @@ -196,6 +196,9 @@ See also: - Suppressed a warning specific to MinGW GCC 8+ (see [mosra/magnum#474](https://github.com/mosra/magnum/issues/474)) - Linux and Emscripten builds were migrated from Travis to Circle CI +- @ref Trade::ObjImporter "ObjImporter" uses exceptions internally and needs + an explicit exception-enabling flag when built with Emscripten 1.39.0 and + newer @subsection changelog-latest-bugfixes Bug fixes diff --git a/src/MagnumPlugins/ObjImporter/CMakeLists.txt b/src/MagnumPlugins/ObjImporter/CMakeLists.txt index 1fbac5e89..0c63dc95d 100644 --- a/src/MagnumPlugins/ObjImporter/CMakeLists.txt +++ b/src/MagnumPlugins/ObjImporter/CMakeLists.txt @@ -50,6 +50,13 @@ if(CMAKE_RUNTIME_OUTPUT_DIRECTORY AND CMAKE_LIBRARY_OUTPUT_DIRECTORY AND CMAKE_A LIBRARY_OUTPUT_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/magnum$<$:-d>/importers ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/magnum$<$:-d>/importers) endif() +if(CORRADE_TARGET_EMSCRIPTEN) + # Since 1.39.0, this needs to be enabled on the plugin. Before (on 1.38.44 + # at least) this wasn't needed, at least for the test -- having it enabled + # for the test binary and in the linker was enough. Most probably related + # to fastcomp->llvm backend switch. + set_property(TARGET ObjImporter APPEND_STRING PROPERTY COMPILE_FLAGS " -s DISABLE_EXCEPTION_CATCHING=0") +endif() install(FILES ObjImporter.h ${CMAKE_CURRENT_BINARY_DIR}/configure.h DESTINATION ${MAGNUM_PLUGINS_INCLUDE_INSTALL_DIR}/ObjImporter)