File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,16 @@ function(cxx_qt_import_crate)
61
61
"QMAKE=${IMPORT_CRATE_QMAKE} "
62
62
$< $< BOOL:${CMAKE_RUSTC_WRAPPER} > :RUSTC_WRAPPER=${CMAKE_RUSTC_WRAPPER} > )
63
63
64
+ # When using WASM ensure that we have RUST_CXX_NO_EXCEPTIONS set
65
+ if (${CMAKE_SYSTEM_NAME} MATCHES "Emscripten" )
66
+ # Read any existing CXX_FLAGS and append RUST_CXX_NO_EXCEPTIONS
67
+ set (EMSCRIPTEN_CXX_FLAGS "${CMAKE_CXX_FLAGS} " )
68
+ list (APPEND EMSCRIPTEN_CXX_FLAGS "-DRUST_CXX_NO_EXCEPTIONS" )
69
+
70
+ message (STATUS "CXX-Qt Found Emscripten, setting CXXFLAGS=${EMSCRIPTEN_CXX_FLAGS} " )
71
+ corrosion_set_env_vars (${CRATE} "CXXFLAGS=${EMSCRIPTEN_CXX_FLAGS} " )
72
+ endif ()
73
+
64
74
file (MAKE_DIRECTORY "${IMPORT_CRATE_CXX_QT_EXPORT_DIR} /crates/${CRATE} /include/" )
65
75
target_include_directories (${CRATE} INTERFACE "${IMPORT_CRATE_CXX_QT_EXPORT_DIR} /crates/${CRATE} /include/" )
66
76
You can’t perform that action at this time.
0 commit comments