1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 15:23:05 +04:00

[js] Remove obsolete C++11 definition in 5.x branch

In OpenCV 5.x, C++17 is the minimum requirement.
The hardcoded `-std=c++11` in `modules/js/CMakeLists.txt` is no longer necessary and
actually causes build failures when using **Emscripten 4.0.20+**, as Embind now requires C++17 or newer.

Unlike the fix in #28178 for the 4.x branch,
this PR takes a cleanup approach for the 5.x branch by removing the legacy flag entirely.

- Fixes build failure with Emscripten 4.0.20+ on 5.x branch.
- Aligns with the C++17 requirement of OpenCV 5.x.
This commit is contained in:
Kumataro
2025-12-29 16:25:12 +09:00
parent eb36a78f5e
commit ac58382620
-2
View File
@@ -79,8 +79,6 @@ ocv_add_module(js BINDINGS PRIVATE_REQUIRED opencv_js_bindings_generator)
ocv_module_include_directories(${EMSCRIPTEN_INCLUDE_DIR})
add_definitions("-std=c++11")
set(deps ${OPENCV_MODULE_${the_module}_DEPS})
list(REMOVE_ITEM deps opencv_js_bindings_generator) # don't add dummy module
link_libraries(${deps})