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

Fix top-level / superbuilds to configure successfully for iOS / cross-building

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • None
    • 6.0
    • Build System: CMake

    Description

      For iOS specifically, it currently fails because we don't force set the CMAKE_OSX_SYSROOT and CMAKE_OSX_ARCHITECTURES cache variables (but only regularly set them) in qtbase/cmake/QtAutoDetect.cmake,

      There is a project() call in the top level qt5.git/CMakeLists.txt file, it means those variables get auto-populated by CMake.

      Most likely we need to conditionally include QtAutoDetect from qt5.git/CMakeLists.txt before the project() call just like we do it in qtbase. Overriding them later (in qtbase) is most likely not safe.

      One can temporarily bypass the issue by force-setting the values.

      But then 2 more general issues come up.

      We set QT_NO_CREATE_TARGETS to TRUE in the super build, which means that qt_add_tool() calls fail due to not finding the tool targets.

      If one bypasses that temporarily by commenting out the line, the next issue is that the find_package(Qt6) call in qtsvg fails to find Qt6, presumably because of FIND_ROOT_PATH / sysroot issues. Setting FIND_ROOT_PATH_MODE_PACKAGE to BOTH is incorrect, cause then the host Qt6 is found.
      Most likely we need to prepend the qt6 cross-compiling super build folder to CMAKE_FIND_ROOT_PATH.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              jbornema Joerg Bornemann
              alexandru.croitor Alexandru Croitor
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes