summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2020-08-04 17:24:17 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2020-08-10 11:56:54 +0200
commit3c52f8af9dbc125eee22115910c25510df8fede0 (patch)
tree3a3d7c60c53cb3c49b506ca721afcce249311c15 /util
parent7e7796fb006e616537a31112438232c124e8ce35 (diff)
CMake: pro2cmake: Specify library versions for 3rd party libraries
If certain 3rd party libraries have a version that's not suitable for Qt, the configure summary should say so, rather than use them and fail at build time. With the current situation, we have to duplicate the version information from the configure.json files in helper.py, by assigning the version number as an extra find_package variable. Rerunning configurejson2cmake then embeds this version info into the qt_find_package calls in configure.cmake. Some of the Find modules are rewritten to take the specified version into account when looking for the libraries. This involves moving around the code for creating a target, after calling find_package_handle_standard_args() so we know if a good enough version was found. Task-number: QTBUG-82917 Change-Id: I139748d8090e0630cda413362760034dc3483e11 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'util')
-rw-r--r--util/cmake/helper.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/util/cmake/helper.py b/util/cmake/helper.py
index d1980e6a5e..eabd8e38b6 100644
--- a/util/cmake/helper.py
+++ b/util/cmake/helper.py
@@ -377,7 +377,7 @@ _library_map = [
LibraryMapping("cups", "Cups", "Cups::Cups"),
LibraryMapping("directfb", "DirectFB", "PkgConfig::DirectFB"),
LibraryMapping("db2", "DB2", "DB2::DB2"),
- LibraryMapping("dbus", "WrapDBus1", "dbus-1", resultVariable="DBus1"),
+ LibraryMapping("dbus", "WrapDBus1", "dbus-1", resultVariable="DBus1", extra=["1.2"]),
LibraryMapping(
"doubleconversion", "WrapDoubleConversion", "WrapDoubleConversion::WrapDoubleConversion"
),
@@ -392,7 +392,7 @@ _library_map = [
"freetype",
"WrapFreetype",
"WrapFreetype::WrapFreetype",
- extra=["REQUIRED"],
+ extra=["2.2.0", "REQUIRED"],
is_bundled_with_qt=True,
),
LibraryMapping("gbm", "gbm", "gbm::gbm"),
@@ -401,7 +401,8 @@ _library_map = [
LibraryMapping("gtk3", "GTK3", "PkgConfig::GTK3"),
LibraryMapping("gssapi", "GSSAPI", "GSSAPI::GSSAPI"),
LibraryMapping(
- "harfbuzz", "WrapHarfbuzz", "WrapHarfbuzz::WrapHarfbuzz", is_bundled_with_qt=True
+ "harfbuzz", "WrapHarfbuzz", "WrapHarfbuzz::WrapHarfbuzz", is_bundled_with_qt=True,
+ extra=["2.6.0"]
),
LibraryMapping("host_dbus", None, None),
LibraryMapping(
@@ -445,7 +446,7 @@ _library_map = [
),
LibraryMapping("oci", "Oracle", "Oracle::OCI"),
LibraryMapping(
- "pcre2", "WrapPCRE2", "WrapPCRE2::WrapPCRE2", extra=["REQUIRED"], is_bundled_with_qt=True
+ "pcre2", "WrapPCRE2", "WrapPCRE2::WrapPCRE2", extra=["10.20", "REQUIRED"], is_bundled_with_qt=True
),
LibraryMapping("pps", "PPS", "PPS::PPS"),
LibraryMapping("psql", "PostgreSQL", "PostgreSQL::PostgreSQL"),
@@ -556,8 +557,8 @@ _library_map = [
LibraryMapping("xkbcommon", "XKB", "XKB::XKB", extra=["0.4.1"]),
LibraryMapping("xlib", "X11", "X11::X11"),
LibraryMapping("xrender", "XRender", "PkgConfig::XRender"),
- LibraryMapping("zlib", "ZLIB", "ZLIB::ZLIB"),
- LibraryMapping("zstd", "ZSTD", "ZSTD::ZSTD"),
+ LibraryMapping("zlib", "ZLIB", "ZLIB::ZLIB", extra=["1.0.8"]),
+ LibraryMapping("zstd", "ZSTD", "ZSTD::ZSTD", extra=["1.3"]),
LibraryMapping("tiff", "TIFF", "TIFF::TIFF"),
LibraryMapping("webp", "WrapWebP", "WrapWebP::WrapWebP"),
LibraryMapping("jasper", "WrapJasper", "WrapJasper::WrapJasper"),