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

Passing absolute paths to CMake causes errors

    XMLWordPrintable

Details

    • User Story
    • Resolution: Done
    • P2: Important
    • None
    • None
    • Build System: CMake
    • openSUSE Tumbleweed
      qtbase on wip/cmake

    Description

      Hey,

      In order to check the changes we'll need to do to our packages, I tried building an experimental Qt6 qtbase package for openSUSE, using the wip/cmake branch.

       

      We pass absolute paths to CMake[1]. The build system doesn't behave as expected in these conditions.

      1/ syncqt is lost when using absolute paths. The generated private headers are created in $builddir/usr/include/qt6/<module>/<version> which is expected in this configuration, but others are created in $builddir/include/<module>/, causing build errors

      2/ The build system doesn't use the INSTALL_* variables in a couple places (eg for installing binaries)

      3/ The generated CMake config targets contain wrong path (eg: INTERFACE_INCLUDE_DIRECTORIES is hardcoded to `${_IMPORT_PREFIX}/include/QtCore`)

      4/ qmake -query returns wrong paths

      5/ Enabling BUILD_TESTING failed with our command line

       

      [1] The command line used is cmake -DCMAKE_INSTALL_PREFIX=/usr -DINSTALL_ARCHDATADIR=/usr/lib64/qt6 -DINSTALL_BINDIR=/usr/lib64/qt6/bin -DINSTALL_DATADIR=/usr/share/qt6 -DINSTALL_DOCDIR=/usr/share/doc/packages/qt6 -DINSTALL_EXAMPLESDIR=/usr/lib64/qt6/examples -DINSTALL_INCLUDEDIR=/usr/include/qt6 -DINSTALL_LIBDIR=/usr/lib64 -DINSTALL_LIBEXECDIR=/usr/lib64/qt6/libexec -DINSTALL_MKSPECSDIR=/usr/lib64/qt6/mkspecs -DINSTALL_PLUGINSDIR=/usr/lib64/qt6/plugins -DINSTALL_QMLDIR=/usr/lib64/qt6/qml -DINSTALL_SYSCONFDIR=/usr/etc/xdg -DINSTALL_TRANSLATIONSDIR=/usr/share/qt6/translations -DBUILD_EXAMPLES=FALSE -DBUILD_TESTING=FALSE -DBUILD_WITH_PCH=FALSE

       

      Attachments

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

        Activity

          People

            alexandru.croitor Alexandru Croitor
            cgiboudeaux Christophe Marin
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes