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

Qt's CMake seems to ignore dependencies when generating APK targets

    XMLWordPrintable

Details

    • Android
    • 6abaff810a (qt/qtbase/dev) 6abaff810a (qt/tqtc-qtbase/dev)

    Description

      I'm working on a project where we have several CMake subprojects that follow this approximate chain of dependency :

      • Library A has no dependencies to my code
      • Library B depends on A
      • An application project C depends on B

      Building on Desktop is working : a top-level CMake project includes the three subprojects using CMake's add_subdirectory command. The CMake project of C calls qt_add_executable(...), and also target_link_libraries(... B).

      When I try building for Android however, the binaries of the dependencies A and B are not copied to the libs/<android_arch>/ directory that is used to build the APK. The build step reports a success, but since the produced APK is missing these dependencies it fails at runtime.

      I've found a hacky and unreliable workaround, but I feel like basic target_link_library(...) calls should be translated to APK inclusion of binaries when Qt's CMake rules generate the APK target. The fact that they apparently do not looks like a bug to me. Or am I missing something?

       

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-94714
          # Subject Branch Project Status CR V

          Activity

            People

              semlanik Alexey Edelev
              graslany Yves Grasland
              Votes:
              5 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: