Open hly2019 opened 3 weeks ago
The simplest way to do this today would probably to specify --pre-js <filename>.js
with a file that modiies the global ENV
map.
I would advice doing something like:
Module['preRun'] = () => {
ENV[XXX] = YYY; <-- your settings here.
}
Version of emscripten/emsdk: 3.1.54
Hi, may I enquire if there is any way to set the environment variables during compilation? I do see the way to set the environments in JavaScript code here https://emscripten.org/docs/porting/connecting_cpp_and_javascript/Interacting-with-code.html#environment-variables, but I'm just curious if it could be set up during compilation. I tried to use
set_property
in CMake but it seems can't work.Thank you very much!