Browse Source

ObjImporter: compile with exceptions enabled on Emscripten.

Actually looking forward to when I rewrite this whole thing.
pull/484/head
Vladimír Vondruš 6 years ago
parent
commit
807a7e939c
  1. 3
      doc/changelog.dox
  2. 7
      src/MagnumPlugins/ObjImporter/CMakeLists.txt

3
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

7
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$<$<CONFIG:Debug>:-d>/importers
ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/magnum$<$<CONFIG:Debug>:-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)

Loading…
Cancel
Save