Details
-
Bug
-
Resolution: Cannot Reproduce
-
P2: Important
-
6.2.0
-
None
-
Windows 10 20H2
emsdk 2.0.14
cmake 3.21.3
Description
The example is an empty qml project with VirtualKeyboard enabled created by QtCreator.
It has both a CMakeLists.txt and a QMake .pro file.
If I try to configure cmake it fails:
PS C:\Example_WASM_VirtualKeyboard\build\wasm> C:\Qt\6.2.0\wasm_32\bin\qt-cmake.bat -GNinja -DCMAKE_BUILD_TYPE=Release ..\..\Source\ -- Performing Test HAVE_STDATOMIC -- Performing Test HAVE_STDATOMIC - Success -- Found WrapAtomic: TRUE -- Using Qt bundled PCRE2. -- Found WrapPCRE2: TRUE -- Performing Test HAVE_GETTIME -- Performing Test HAVE_GETTIME - Success -- Found WrapRt: TRUE -- Found GLESv2: ON -- Performing Test HAVE_EGL -- Performing Test HAVE_EGL - Success -- Found EGL: C:/Qt/Tools/emsdk_2-0-14/upstream/emscripten/system/include (found version "1.5") -- Using Qt bundled PNG. -- Found WrapPNG: TRUE -- Using Qt bundled Harfbuzz. -- Found WrapHarfbuzz: TRUE -- Using Qt bundled Freetype. -- Found WrapFreetype: TRUE -- Found GLESv2: ON -- Configuring done CMake Error at C:/Qt/6.2.0/wasm_32/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:558 (add_executable): Target "Source" links to target "Qt6::BundledOpenwnn" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing? Call Stack (most recent call first): C:/Qt/6.2.0/wasm_32/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:523 (_qt_internal_create_executable) C:/Qt/6.2.0/wasm_32/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:820 (qt6_add_executable) CMakeLists.txt:23 (qt_add_executable) CMake Error at C:/Qt/6.2.0/wasm_32/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:558 (add_executable): Target "Source" links to target "Qt6::BundledPinyin" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing? Call Stack (most recent call first): C:/Qt/6.2.0/wasm_32/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:523 (_qt_internal_create_executable) C:/Qt/6.2.0/wasm_32/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:820 (qt6_add_executable) CMakeLists.txt:23 (qt_add_executable) CMake Error at C:/Qt/6.2.0/wasm_32/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:558 (add_executable): Target "Source" links to target "Qt6::BundledTcime" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing? Call Stack (most recent call first): C:/Qt/6.2.0/wasm_32/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:523 (_qt_internal_create_executable) C:/Qt/6.2.0/wasm_32/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:820 (qt6_add_executable) CMakeLists.txt:23 (qt_add_executable) -- Generating done CMake Generate step failed. Build files cannot be regenerated correctly.
QMake works:
PS C:\Example_WASM_VirtualKeyboard\build\wasm> C:\Qt\6.2.0\wasm_32\bin\qmake.bat ..\..\Source\Source.pro Info: creating stash file C:\Example_WASM_VirtualKeyboard\build\wasm\.qmake.stash Project WARNING: This Qt was built with Emscripten version 2.0.13. You have 2.0.14. The difference may cause issues.
The build of the qmake project sadly fails because a lack of threads:
wasm-ld: error: unable to find library -lThreads::Threads
But I am okay with that, it would work with my multithreaded build of Qt 6.2 I guess. It also fails to configure with CMake for the multithreaded build of Qt.
(Off topic: Still not sure why the VirtualKeyboard needs multithreading, in the Qt5 past it used to need multithreading, then in newer versions of Qt5 it did not and now in Qt6 it does again? Make up your mind. )