Details
-
User Story
-
Resolution: Done
-
P2: Important
-
None
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?