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

qt_internal_add_test calls don't handle extra properties for Android

    XMLWordPrintable

Details

    • Android
    • 4b8bc8b5bb (qt/qtbase/dev) 26307ee6ae (qt/qtbase/6.3) 26307ee6ae (qt/tqtc-qtbase/6.3) 26307ee6ae (qt/tqtc-qtbase/6.3.0)

    Description

      The following doesn't work with either of qt_internal_add_test() and qt_internal_add_manual_test():

      qt_internal_add_test(tst_name
          SOURCES
              tst_name.cpp
      )
      
      set_property(TARGET tst_name APPEND PROPERTY QT_ANDROID_PACKAGE_SOURCE_DIR
          ${CMAKE_CURRENT_SOURCE_DIR}/android
      )
      
      qt_finalize_executable(tst_name)
      

      The following error is thrown: 

      error: add_custom_target cannot create target "tst_name_prepare_apk_dir" because another target with the same name already exists. The existing target is a custom target created in source directory "<path_to_project>".
      

       

      One need to use this call instead as a workaround (the call is private api)

       qt_android_generate_deployment_settings(tst_name)
      

       

      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
              assam Assam Boudjelthia
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes