Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Qt6.1 android and subdirectory shared libs
Qt 6.11 is out! See what's new in the release blog

Qt6.1 android and subdirectory shared libs

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
2 Posts 2 Posters 562 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • O Offline
    O Offline
    Oleg Shalnev
    wrote on last edited by
    #1

    Good day!

    Let me describe the situation I've found with android compilation and deploy.

    As usual I have use sub directories for creating shared libs.

    1. When you try to create CMakeLists.txt in project root dir and gui as sub dir and add gui dir by "add_subdirectory"
      in core project file, the build will fail with "No target architecture defined in json file."

    2. If you try to use gui application dir as a root project dir with lib subdir compilation of shared lib will fail.

    QtCreator build normal deployment-settings.json for gui, but whron settings.json for subdir lib
    67c08441-5a11-42d2-a975-34bbfb167449-изображение.png
    aa48bb57-d1c4-4bf4-83de-c0a7f258fec6-изображение.png

    As you can see there is no correct setting info is sub project.

    The question is -> Have I possibilities to use complicated modules management with libraries and sub directories.

    Platform: Linux Ubuntu 21.04, QtCreator 4.15, Qt 6.1

    Thank's a lot for your attention and answers.

    1 Reply Last reply
    0
    • R Offline
      R Offline
      Ray Gray
      wrote on last edited by
      #2

      I have a similar problem on Windows. Here is a workaround I use.

      Consider this 'master' (top) CMakeLists.txt:

      add_subdirectory(MyGui)
      add_subdirectory(MyLib)
      

      ... then the build directory will contain:

      build directory (android-MyGui-deployment-settings.json, ...)
      |_ MyLib
      |_ MyGui (android-MyGui-deployment-settings.json, ...)
      |_ ...
      

      There are two android-MyGui-deployment-settings.json files there, one in the root and one in the MyGui folder.
      Simple copy the one from MyGui and overwrite the one in the root - and you are ready to debug or run the app!

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved