Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-25216

"_prepare_apk_dir" appended to the wrong target in "Projects > Build Settings"

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • Qt Creator 5.0.0-beta1
    • Qt Creator 4.14.0
    • None
    • ArchLinux,
      Opensource Qt v6.0.1 Installed via official installer.
      QtCreator installed via pacman:

      ~ > pacman -Qi qtcreator
      Name : qtcreator
      Version : 4.14.0-3
    • Android
    • f9a8e47d13b7fec4f26c9f641271843f9ca65394 (qt-creator/qt-creator/5.0)

    Description

      QtCreator automatically adds a "prepare_apk_dir" after the default "all" target:
      https://github.com/qt-creator/qt-creator/blob/master/src/plugins/cmakeprojectmanager/cmakebuildstep.cpp#L476-L501

      However this fails on a project where a non-executable library is "alphabetically" before the "real executable" target.

      add_library(        TARGET_A SHARED main.cpp)
      qt6_add_executable( TARGET_B        main.cpp)
      

      It should use the "TARGET_B_prepare_apk_dir" instead of "TARGET_A_prepare_apk_dir", since TARGET_A is a library, it does not have the "*_prepare_apk_dir" target.

      Attachments

        1. CMakeLists.txt
          0.4 kB
        2. image-2021-01-09-14-56-06-954.png
          image-2021-01-09-14-56-06-954.png
          32 kB
        3. main.cpp
          0.2 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            assam Assam Boudjelthia
            leroy Haoyu Liu
            Votes:
            9 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes