Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-93485

Configuring qtvirtualkeyboard CMake example fails with static Qt

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.1.0, 6.2
    • Build System: CMake
    • None

    Description

      I tested with the official iOS packages (because they are static) but should reproduce with any static build.

      mkdir build && cd build
      /Volumes/T3/Dev/qt/official_qt/6.1.0/ios/bin/qt-cmake /Volumes/T3/Dev/qt/official_qt/Examples/Qt-6.1.0/virtualkeyboard/basic/
      
      -- Found WrapFreetype: TRUE
      -- Running qmlimportscanner to find used QML plugins.
      -- Configuring done
      CMake Error at /Volumes/T3/Dev/qt/official_qt/6.1.0/ios/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:508 (add_executable):
        Target "basic" 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):
        /Volumes/T3/Dev/qt/official_qt/6.1.0/ios/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:475 (_qt_internal_create_executable)
        /Volumes/T3/Dev/qt/official_qt/6.1.0/ios/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:566 (qt6_add_executable)
        CMakeLists.txt:23 (qt_add_executable)
      
      
      CMake Error at /Volumes/T3/Dev/qt/official_qt/6.1.0/ios/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:508 (add_executable):
        Target "basic" 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):
        /Volumes/T3/Dev/qt/official_qt/6.1.0/ios/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:475 (_qt_internal_create_executable)
        /Volumes/T3/Dev/qt/official_qt/6.1.0/ios/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:566 (qt6_add_executable)
        CMakeLists.txt:23 (qt_add_executable)
      
      
      CMake Error at /Volumes/T3/Dev/qt/official_qt/6.1.0/ios/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:508 (add_executable):
        Target "basic" 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):
        /Volumes/T3/Dev/qt/official_qt/6.1.0/ios/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:475 (_qt_internal_create_executable)
        /Volumes/T3/Dev/qt/official_qt/6.1.0/ios/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:566 (qt6_add_executable)
        CMakeLists.txt:23 (qt_add_executable)
      
      
      -- Generating done
      CMake Generate step failed.  Build files cannot be regenerated correctly
      

      The problem is that the vkb plugins link directly to Bundled libs instead of doing it via FindWrapFoo scripts.

      https://github.com/qt/qtvirtualkeyboard/blob/dev/src/plugins/tcime/plugin/CMakeLists.txt#L24

      should be like this instead

      https://github.com/qt/qtbase/blob/dev/src/gui/CMakeLists.txt#L555
      https://github.com/qt/qtbase/blob/dev/cmake/FindWrapPNG.cmake

      This means none of the bundled library packages are recorded as dependencies for the plugin CMake packages, so they are not automatically find_package'd and configuration fails.

      Attachments

        Issue Links

          Activity

            People

              qtbuildsystem Qt Build System Team
              alexandru.croitor Alexandru Croitor
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: