Merge pull request #30009 from Kumataro:cleanupEmscriptionInstallationGuide

js: doc: clean up Emscripten installation guide and remove outdated C++17 note - #30009

### Summary
- Updated `js_setup.markdown` for modern Emscripten (emsdk 6.x) usage.
- Replaced deprecated `./emsdk update` with `git pull`.
- Replaced outdated version recommendations (`2.0.10`) with `latest` and explicit version fallback (`6.0.9`).
- Removed obsolete Note regarding `--cmake_option="-DCMAKE_CXX_STANDARD=17"`, as OpenCV 5 now defaults to C++17.

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [x] There is a reference to the original bug report and related work
- [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [ ] The feature is well documented and sample code can be built with the project CMake
This commit is contained in:
Kumataro
2026-09-21 12:20:24 +03:00
committed by GitHub
parent 8d126c4a67
commit 02cfacfbe7
@@ -16,7 +16,7 @@ To Install Emscripten, follow instructions of [Emscripten SDK](https://emscripte
For example:
@code{.bash}
./emsdk update
git pull # Note: ./emsdk update is deprecated in modern emsdk; use git pull to update the repository.
./emsdk install latest
./emsdk activate latest
@endcode
@@ -37,13 +37,14 @@ emcmake sh -c 'echo ${EMSCRIPTEN}'
@endcode
The version 2.0.10 of emscripten is verified for latest WebAssembly. Please check the version of Emscripten to use the newest features of WebAssembly.
The Emscripten SDK is continuously updated. If you encounter build errors with the latest version, please install and activate a specific version explicitly.
For example:
@code{.bash}
./emsdk update
./emsdk install 2.0.10
./emsdk activate 2.0.10
git pull
./emsdk list # to show available versions. v6.0.9 is used in the following steps.
./emsdk install 6.0.9
./emsdk activate 6.0.9
@endcode
Obtaining OpenCV Source Code
@@ -85,11 +86,6 @@ Building OpenCV.js from Source
@note
- It requires `python` and `cmake` installed in your development environment.
- To build with Emscripten 4.0.20 or later, append --cmake_option="-DCMAKE_CXX_STANDARD=17" .
Embind requires C++17 or later since Emscripten 4.0.20.
@code{.bash}
emcmake python ./opencv/platforms/js/build_js.py build_js --cmake_option="-DCMAKE_CXX_STANDARD=17"
@endcode
-# [Optional] To build the OpenCV.js loader, append `--build_loader`.