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

CMake testing expect a fake_prefix folder resembling the installation prefix

    XMLWordPrintable

Details

    • Android
    • 0d42f4df9275897d708ee01ed879ac185aab7360 (qt/qtbase/dev) ab9032acbb6a6ffb0a4fd43eee8a4fe8bbf27ca1 (qt/qtbase/6.1) dc34954d4c3700ee4e78b9707ce45b31d5f4331b (qt/qtbase/6.0)

    Description

      When running unit tests for Android (probably the same for all cross-platform builds), CMake expects the fake_prefix folder at the root of the CMake tests build folder. For Android, the folder <qt_prefix>/src/ contains files needed for Android Gradle builds, without them apk generation won't work. For now, a workaround on Linux is to have a symbolic link from the actually installed qt prefix. 

      The root cause is that androiddeployqt tries to copy the Gradle files from the fake_root where it should look in the qt install prefix

      Cannot find template directory /home/assam/sources/qt5/qt5/qtbase/tests/build-tests/fake_prefix/src/3rdparty/gradle
      

      the path is assigned by CMake  when generating  the JSON file in qtbase/src/corelib/Qt6AndroidMacros.cmake, we have this check

      if (NOT QT_BUILDING_QT OR QT_STANDALONE_TEST_PATH)
      

      that check for standalone var shouldn't be there and then, the value of qt_android_install_dir should be

      set(qt_android_install_dir "${qt_path}")

      instead of

      set(qt_android_install_dir "${CMAKE_INSTALL_PREFIX}")
      

      Attachments

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

        Activity

          People

            assam Assam Boudjelthia
            assam Assam Boudjelthia
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes