I'm a complete CMake noob, so no idea what's actually going on there,
but I just wanted to raise here that I found the relatively recent
<
https://github.com/emscripten-core/emscripten/commit/2ee11886a31f8ac296741e2a9bacaf2f4041b830>
"Add OpenGL::GL cmake imported targets" apparently impacting my build of
at least recent Qt6 trunk (towards Qt 6.10), where a `.../qt5/configure
-feature-thread -feature-wasm-exceptions -feature-wasm-jspi -xplatform
wasm-emscripten -prefix ... -qt-host-path ...` failed with
> CMake Error at /home/sberg/emsdk/4.0.6/emsdk/emscripten/main/cmake/Modules/FindOpenGL.cmake:34 (add_library):
> add_library cannot create imported target "OpenGL::GL" because another
> target with the same name already exists.
> Call Stack (most recent call first):
> qtbase/cmake/FindWrapOpenGL.cmake:57 (find_package)
> qtbase/cmake/QtFindPackageHelpers.cmake:141 (find_package)
> qtbase/src/gui/configure.cmake:67 (qt_find_package)
> qtbase/cmake/QtFeature.cmake:1030 (include)
> qtbase/src/CMakeLists.txt:13 (qt_feature_evaluate_features)
and
> CMake Error at /home/sberg/emsdk/4.0.6/emsdk/emscripten/main/cmake/Modules/FindOpenGL.cmake:40 (add_library):
> add_library cannot create imported target "OpenGL::GLU" because another
> target with the same name already exists.
> Call Stack (most recent call first):
> qtbase/cmake/FindWrapOpenGL.cmake:57 (find_package)
> qtbase/cmake/QtFindPackageHelpers.cmake:141 (find_package)
> qtbase/src/gui/configure.cmake:67 (qt_find_package)
> qtbase/cmake/QtFeature.cmake:1030 (include)
> qtbase/src/CMakeLists.txt:13 (qt_feature_evaluate_features)
and which I solved locally for now by reverting that above "Add
OpenGL::GL cmake imported targets" emscripten commit.