Description
Hello,
I'm trying to compile WASM OpenCV libraries to include in another project.
Spent entire day trying different options, but no success so far.
Official way is to use script platforms/js/build_js.py.
But this is just doesn't work for me:
$ emcmake python ./platforms/js/build_js.py build_js --build_test configure: python ./platforms/js/build_js.py build_js --build_test '-DCMAKE_TOOLCHAIN_FILE=C:\Projects\emsdk\upstream\emscripten\cmake\Modules\Platform\Emscripten.cmake' -DCMAKE_CROSSCOMPILING_EMULATOR=C:/Projects/emsdk/node/22.16.0_64bit/bin/node.exe -G Ninja usage: build_js.py [-h] [--opencv_dir OPENCV_DIR] [--emscripten_dir EMSCRIPTEN_DIR] [--build_wasm] [--disable_wasm] [--disable_single_file] [--threads] [--simd] [--build_test] [--build_perf] [--build_doc] [--build_loader] [--clean_build_dir] [--skip_config] [--config_only] [--enable_exception] [--cmake_option CMAKE_OPTION] [--build_flags BUILD_FLAGS] [--build_wasm_intrin_test] [--config CONFIG] [--webnn] build_dir build_js.py: error: unrecognized arguments: -G Ninja emcmake: error: 'python ./platforms/js/build_js.py build_js --build_test '-DCMAKE_TOOLCHAIN_FILE=C:\Projects\emsdk\upstream\emscripten\cmake\Modules\Platform\Emscripten.cmake' -DCMAKE_CROSSCOMPILING_EMULATOR=C:/Projects/emsdk/node/22.16.0_64bit/bin/node.exe -G Ninja' failed (returned 2)
Not sure why it invokes node.exe with -G Ninja flag. Is this suppose to work ?
Also i'm not sure i can compile just static libs this way (just .a files, and without .wasm files). There is no specific build flags for this.
I also tried to invoke cmake myself, but in this case it throws lot of errors about missing dependencies, There is no way to gather all this dependencies manually in reasonable amount of time.
Any idea how to compile the libs ?