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

Add support for specifying package version in configurejson2cmake

    XMLWordPrintable

Details

    Description

      configure.json files check for versions of libraries / packages.

      But the version checking mechanism is not consistent, sometimes it's with a compile test that uses version defines and the preprocessor

      "pcre2": {
                  "label": "PCRE2",
                  "test": {
                      "head": "#define PCRE2_CODE_UNIT_WIDTH 16",
                      "tail": [
                          "#if (PCRE2_MAJOR < 10) || ((PCRE2_MAJOR == 10) && (PCRE2_MINOR < 20))",
                          "#  error This PCRE version is not supported",
                          "#endif"
                      ]
                  },
      

      Sometimes it's in the arguments given to pkg-config

      "dbus": {
                  "label": "D-Bus >= 1.2",
                  "test": {
                      "main": "(void) dbus_bus_get_private(DBUS_BUS_SYSTEM, (DBusError *)NULL);"
                  },
                  "headers": "dbus/dbus.h",
                  "sources": [
                      { "type": "pkgConfig", "args": "dbus-1 >= 1.2" }
      

      If a library in mapped to a CMake FindWrap script in configurejson2cmake, no version information gets transferred from the configure.json file.

      We should investigate how to handle version specification properly: do we hardcode it in the FindWrap files? Do we hardcode it in configurejson2cmake, and that generates an appropriate qt_find_package(VERSION foo) call? Something else?

      Attachments

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

        Activity

          People

            alexandru.croitor Alexandru Croitor
            alexandru.croitor Alexandru Croitor
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes