I have successfully installed Emscripten on Windows but when I'm trying to build my project for Emscripten the configuration fails with this error:
CMake Error at external/magnum/CMakeLists.txt:295 (include):
include could not find load file:
UseEmscripten
magnum/CMakeLists.txt seems to try to include UseEmscripten.cmake but this file is located in magnum/toolchains/modules. I think that the relative path is wrong - the file is in a different directory:
|
if(CORRADE_TARGET_EMSCRIPTEN) |
|
include(UseEmscripten) |
|
endif() |
Few notes:
- I have pulled newest
magnum, magnum-integration and corrade (all from their master).
- It's unclear to me in which shell and what state should I have before running commands desribed here: https://doc.magnum.graphics/corrade/building-corrade.html#building-corrade-cross-emscripten - it seems to me that corrade docs coflict with this emscripten docs which tell me to use
emcmake cmake and then input my all flags as usual. emcmake adds extra cmake flags, including CMAKE_TOOLCHAIN_FILE which has different path value from one recommended in corrade docs.
- I get the same error regardless of whether I use
cmake ... or emcmake cmake ... in emscripten-activated shell.
- For native 64-bit Windows build I'm building the project using submoduled magnum and corrade repositories, added by
add_subdirectory within my CMake files. I would like to keep this approach. It works very well.
- I would like to build my project as for the native build, just with small differences as on emscripten docs (
emcmake cmake ... instead of cmake ... and emmake make instead of make). A lot of my dependencies are recursively git-submoduled and are added using add_subdirectory in my CMake files (this also applies to magnum and corrade). This forms some dependency chain in CMake recipes and when I tell CMake to build everything it performs incremental build flawlessly.
I have successfully installed Emscripten on Windows but when I'm trying to build my project for Emscripten the configuration fails with this error:
magnum/CMakeLists.txtseems to try to includeUseEmscripten.cmakebut this file is located inmagnum/toolchains/modules. I think that the relative path is wrong - the file is in a different directory:magnum/CMakeLists.txt
Lines 294 to 296 in 515bfce
Few notes:
magnum,magnum-integrationandcorrade(all from theirmaster).emcmake cmakeand then input my all flags as usual.emcmakeadds extra cmake flags, includingCMAKE_TOOLCHAIN_FILEwhich has different path value from one recommended in corrade docs.cmake ...oremcmake cmake ...in emscripten-activated shell.add_subdirectorywithin my CMake files. I would like to keep this approach. It works very well.emcmake cmake ...instead ofcmake ...andemmake makeinstead ofmake). A lot of my dependencies are recursively git-submoduled and are added usingadd_subdirectoryin my CMake files (this also applies to magnum and corrade). This forms some dependency chain in CMake recipes and when I tell CMake to build everything it performs incremental build flawlessly.