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

QT_ANDROID_EXTRA_LIBS does not detect library dependencies

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 6.5.0 Beta1
    • 6.4.0, 6.5.0 FF
    • Build System: CMake
    • None
    • Android
    • 54c959643e (qt/qtbase/dev) 54c959643e (qt/tqtc-qtbase/dev)

    Description

      I want to explicitly specify that my target needs to deploy a Qt Positioning nmea plugin on Android. This nmea plugin depends on Qt::SerialPort.

      I use QT_ANDROID_EXTRA_LIBS for that:

      if(ANDROID)
          get_target_property(NmeaPluginPath Qt6::QGeoPositionInfoSourceFactoryNmeaPlugin IMPORTED_LOCATION)
          if (EXISTS "${NmeaPluginPath}")
              set_target_properties(geoflickr PROPERTIES
                  QT_ANDROID_EXTRA_LIBS "${NmeaPluginPath}"
              )
          endif()
      endif()
      

      As a result, the plugin library is added to android-build/libs/{arch} subdirectory of the build directory, but the Qt::SerialPort library is not.
      When I do the build, I see the following warning from CMake:

      Skipping /home/ivan/android_tools/qt6_build/arm64-v8a/install/plugins/position/libplugins_position_qtposition_nmea_arm64-v8a.so. It has unmet dependencies: lib/libQt6SerialPort_arm64-v8a.so.
      

      I would expect QT_ANDROID_EXTRA_LIBS to deploy the libraries together with their dependencies.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              semlanik Alexey Edelev
              ivan.solovev Ivan Solovev
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes