Closed floooh closed 9 years ago
Both features sound good. I'll think about this a bit to feel out what would be the best method to implement it.
I resolved this now with a --embedded
command line option to emsdk activate
, which has the effect of generating the necessary configuration inside the emsdk root directory. See https://github.com/juj/emsdk/commit/ef17aeb6166519385bfb895cd6220c31d62ecb2f . Let me know if that solution is suitable, or if there's still something that is still missing.
Nice, thanks! I'll give a whirl over the weekend and report back :)
It seems to work nicely, in my cmake toolchain file I'm first trying to find the .emscripten file in the emsdk directory, and if present call emcc with --em-config and --cache. If not I assume the ~/.emscripten exists and call emcc as usual.
After going back to the incoming branch I stumbled over this bug though (unrelated): https://github.com/kripken/emscripten/issues/3149
Can you tell when this will be available in the emsdk via ./emsdk update?
Great to hear. I'm working on getting a new emsdk update out this weekend, so it should be very soon.
It would be nice if we could provide an alternate location for the .emscripten file at install with an additional '--' option (e.g. "./emsdk install --em-config ~/bla/blub/.emscripten sdk-incoming-64bit").
This would be an advanced option for people who use their own build systems or who want to have multiple emscripten SDKs installed in parallel. In my case it's about this build system and engine: http://github.com/floooh/fips and http://github.com/floooh/oryol, I have my own cmake toolchain file which would then add a --em-config to the emcc call.
The other missing feature preventing multiple SDK install was to provide a separate .emscripten_cache directory, I'm not sure whether this is already implemented in emscripten itself, @waywardmonkeys stumbled over this a little while ago.