summaryrefslogtreecommitdiffstats
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
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>
-rw-r--r--cmake/FindWrapDBus1.cmake6
-rw-r--r--cmake/FindWrapSystemFreetype.cmake47
-rw-r--r--cmake/FindWrapSystemHarfbuzz.cmake50
-rw-r--r--cmake/FindWrapSystemPCRE2.cmake53
-rw-r--r--cmake/FindWrapSystemPNG.cmake46
-rw-r--r--cmake/FindZSTD.cmake3
-rw-r--r--configure.cmake6
-rw-r--r--src/corelib/configure.cmake2
-rw-r--r--src/gui/.prev_configure.cmake4
-rw-r--r--src/gui/configure.cmake4
-rw-r--r--util/cmake/helper.py13
11 files changed, 151 insertions, 83 deletions
diff --git a/cmake/FindWrapDBus1.cmake b/cmake/FindWrapDBus1.cmake
index ee856e1de5..e227d224e0 100644
--- a/cmake/FindWrapDBus1.cmake
+++ b/cmake/FindWrapDBus1.cmake
@@ -19,7 +19,7 @@ if(DEFINED ENV{PKG_CONFIG_LIBDIR})
set(__qt_dbus_pcl "$ENV{PKG_CONFIG_LIBDIR}")
endif()
-find_package(DBus1 QUIET)
+find_package(DBus1 ${${CMAKE_FIND_PACKAGE_NAME}_FIND_VERSION} QUIET)
if(DEFINED __qt_dbus_pcd)
set(ENV{PKG_CONFIG_DIR} "${__qt_dbus_pcd}")
@@ -42,4 +42,6 @@ if(DBus1_FOUND)
endif()
include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(WrapDBus1 DEFAULT_MSG WrapDBus1_FOUND)
+find_package_handle_standard_args(WrapDBus1 REQUIRED_VARS
+ DBus1_LIBRARY DBus1_INCLUDE_DIR WrapDBus1_FOUND
+ VERSION_VAR DBus1_VERSION)
diff --git a/cmake/FindWrapSystemFreetype.cmake b/cmake/FindWrapSystemFreetype.cmake
index 41c669b973..2cf6caca19 100644
--- a/cmake/FindWrapSystemFreetype.cmake
+++ b/cmake/FindWrapSystemFreetype.cmake
@@ -1,37 +1,50 @@
# We can't create the same interface imported target multiple times, CMake will complain if we do
# that. This can happen if the find_package call is done in multiple different subdirectories.
if(TARGET WrapSystemFreetype::WrapSystemFreetype)
- set(WrapSystemFreetype_FOUND ON)
+ set(WrapSystemFreetype_FOUND TRUE)
return()
endif()
-
-set(WrapSystemFreetype_FOUND OFF)
+set(WrapSystemFreetype_REQUIRED_VARS __freetype_found)
# Hunter has the package named freetype, but exports the Freetype::Freetype target as upstream
# First try the CONFIG package, and afterwards the MODULE if not found
-
-find_package(Freetype QUIET CONFIG NAMES Freetype freetype QUIET)
+find_package(Freetype ${${CMAKE_FIND_PACKAGE_NAME}_FIND_VERSION}
+ CONFIG NAMES Freetype freetype QUIET)
if(NOT Freetype_FOUND)
- find_package(Freetype QUIET MODULE)
+ find_package(Freetype ${${CMAKE_FIND_PACKAGE_NAME}_FIND_VERSION} QUIET MODULE)
endif()
if(Freetype_FOUND)
# vcpkg defines a lower case target name, while upstream Find module defines a prefixed
# upper case name.
- set(potential_target_names Freetype::Freetype freetype)
- foreach(target_name ${potential_target_names})
- if(TARGET ${target_name})
- set(WrapSystemFreetype_FOUND ON)
- set(final_target_name ${target_name})
-
- add_library(WrapSystemFreetype::WrapSystemFreetype INTERFACE IMPORTED)
- target_link_libraries(WrapSystemFreetype::WrapSystemFreetype INTERFACE
- ${final_target_name})
-
+ set(__freetype_potential_target_names Freetype::Freetype freetype)
+ foreach(__freetype_potential_target_name ${__freetype_potential_target_names})
+ if(TARGET "${__freetype_potential_target_name}")
+ set(__freetype_target_name "${__freetype_potential_target_name}")
+ set(__freetype_found TRUE)
break()
endif()
endforeach()
endif()
+if(FREETYPE_LIBRARIES)
+ list(PREPEND WrapSystemFreetype_REQUIRED_VARS FREETYPE_LIBRARIES)
+endif()
+if(Freetype_VERSION)
+ set(WrapSystemFreetype_VERSION "${Freetype_VERSION}")
+elseif(FREETYPE_VERSION_STRING)
+ set(WrapSystemFreetype_VERSION "${FREETYPE_VERSION_STRING}")
+endif()
+
include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(WrapSystemFreetype DEFAULT_MSG WrapSystemFreetype_FOUND)
+find_package_handle_standard_args(WrapSystemFreetype
+ REQUIRED_VARS ${WrapSystemFreetype_REQUIRED_VARS}
+ VERSION_VAR WrapSystemFreetype_VERSION)
+
+if(WrapSystemFreetype_FOUND)
+ add_library(WrapSystemFreetype::WrapSystemFreetype INTERFACE IMPORTED)
+ target_link_libraries(WrapSystemFreetype::WrapSystemFreetype
+ INTERFACE "${__freetype_target_name}")
+endif()
+unset(__freetype_target_name)
+unset(__freetype_found)
diff --git a/cmake/FindWrapSystemHarfbuzz.cmake b/cmake/FindWrapSystemHarfbuzz.cmake
index 087c1b070b..3cb44aa766 100644
--- a/cmake/FindWrapSystemHarfbuzz.cmake
+++ b/cmake/FindWrapSystemHarfbuzz.cmake
@@ -1,13 +1,12 @@
# We can't create the same interface imported target multiple times, CMake will complain if we do
# that. This can happen if the find_package call is done in multiple different subdirectories.
if(TARGET WrapSystemHarfbuzz::WrapSystemHarfbuzz)
- set(WrapSystemHarfbuzz_FOUND ON)
+ set(WrapSystemHarfbuzz_FOUND TRUE)
return()
endif()
+set(WrapSystemHarfbuzz_REQUIRED_VARS __harfbuzz_found)
-set(WrapSystemHarfbuzz_FOUND OFF)
-
-find_package(harfbuzz QUIET)
+find_package(harfbuzz ${${CMAKE_FIND_PACKAGE_NAME}_FIND_VERSION} QUIET)
# Gentoo has some buggy version of a harfbuzz Config file. Check if include paths are valid.
set(__harfbuzz_target_name "harfbuzz::harfbuzz")
@@ -21,28 +20,43 @@ if(harfbuzz_FOUND AND TARGET "${__harfbuzz_target_name}")
break()
endif()
endforeach()
-endif()
-if(__harfbuzz_broken_config_file)
- find_package(PkgConfig QUIET)
+ set(__harfbuzz_found TRUE)
+ if(harfbuzz_VERSION)
+ set(WrapSystemHarfbuzz_VERSION "${harfbuzz_VERSION}")
+ endif()
+endif()
- pkg_check_modules(harfbuzz harfbuzz IMPORTED_TARGET)
- set(__harfbuzz_target_name "PkgConfig::harfbuzz")
+if(__harfbuzz_broken_config_file OR NOT __harfbuzz_found)
+ list(PREPEND WrapSystemHarfbuzz_REQUIRED_VARS HARFBUZZ_LIBRARIES HARFBUZZ_INCLUDE_DIRS)
- if (NOT TARGET "${__harfbuzz_target_name}")
- set(harfbuzz_FOUND 0)
+ find_package(PkgConfig QUIET)
+ pkg_check_modules(PC_HARFBUZZ harfbuzz IMPORTED_TARGET)
+
+ find_path(HARFBUZZ_INCLUDE_DIRS
+ NAMES harfbuzz/hb.h
+ HINTS ${PC_HARFBUZZ_INCLUDEDIR})
+ find_library(HARFBUZZ_LIBRARIES
+ NAMES harfbuzz
+ HINTS ${PC_HARFBUZZ_LIBDIR})
+
+ set(__harfbuzz_target_name "PkgConfig::PC_HARFBUZZ")
+ set(__harfbuzz_found TRUE)
+ if(PC_HARFBUZZ_VERSION)
+ set(WrapSystemHarfbuzz_VERSION "${PC_HARFBUZZ_VERSION}")
endif()
endif()
-if(TARGET "${__harfbuzz_target_name}")
- set(WrapSystemHarfbuzz_FOUND ON)
-
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(WrapSystemHarfbuzz
+ REQUIRED_VARS ${WrapSystemHarfbuzz_REQUIRED_VARS}
+ VERSION_VAR WrapSystemHarfbuzz_VERSION)
+if(WrapSystemHarfbuzz_FOUND)
add_library(WrapSystemHarfbuzz::WrapSystemHarfbuzz INTERFACE IMPORTED)
- target_link_libraries(WrapSystemHarfbuzz::WrapSystemHarfbuzz INTERFACE ${__harfbuzz_target_name})
+ target_link_libraries(WrapSystemHarfbuzz::WrapSystemHarfbuzz
+ INTERFACE "${__harfbuzz_target_name}")
endif()
unset(__harfbuzz_target_name)
+unset(__harfbuzz_found)
unset(__harfbuzz_include_dir)
unset(__harfbuzz_broken_config_file)
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(WrapSystemHarfbuzz DEFAULT_MSG WrapSystemHarfbuzz_FOUND)
diff --git a/cmake/FindWrapSystemPCRE2.cmake b/cmake/FindWrapSystemPCRE2.cmake
index 32966c2e30..6d8b471f88 100644
--- a/cmake/FindWrapSystemPCRE2.cmake
+++ b/cmake/FindWrapSystemPCRE2.cmake
@@ -2,25 +2,52 @@ if(TARGET WrapSystemPCRE2::WrapSystemPCRE2)
set(WrapSystemPCRE2_FOUND TRUE)
return()
endif()
+set(WrapSystemPCRE2_REQUIRED_VARS __pcre2_found)
-find_package(PCRE2 CONFIG QUIET)
+find_package(PCRE2 ${${CMAKE_FIND_PACKAGE_NAME}_FIND_VERSION} CONFIG QUIET)
-if(PCRE2_FOUND AND TARGET PCRE2::pcre2-16)
+set(__pcre2_target_name "PCRE2::pcre2-16")
+if(PCRE2_FOUND AND TARGET "${__pcre2_target_name}")
# Hunter case.
- add_library(WrapSystemPCRE2::WrapSystemPCRE2 INTERFACE IMPORTED)
- target_link_libraries(WrapSystemPCRE2::WrapSystemPCRE2 INTERFACE PCRE2::pcre2-16)
- set(WrapSystemPCRE2_FOUND TRUE)
-else()
- find_library(PCRE2_LIBRARIES NAMES pcre2-16)
- find_path(PCRE2_INCLUDE_DIRS pcre2.h)
+ set(__pcre2_found TRUE)
+ if(PCRE2_VERSION)
+ set(WrapSystemPCRE2_VERSION "${PCRE2_VERSION}")
+ endif()
+endif()
+
+if(NOT __pcre2_found)
+ list(PREPEND WrapSystemPCRE2_REQUIRED_VARS PCRE2_LIBRARIES PCRE2_INCLUDE_DIRS)
+
+ find_package(PkgConfig QUIET)
+ pkg_check_modules(PC_PCRE2 QUIET libpcre2-16)
+
+ find_path(PCRE2_INCLUDE_DIRS
+ NAMES pcre2.h
+ HINTS ${PC_PCRE2_INCLUDEDIR})
+ find_library(PCRE2_LIBRARIES
+ NAMES pcre2-16
+ HINTS ${PC_PCRE2_LIBDIR})
+ if(PC_PCRE2_VERSION)
+ set(WrapSystemPCRE2_VERSION "${PC_PCRE2_VERSION}")
+ endif()
if (PCRE2_LIBRARIES AND PCRE2_INCLUDE_DIRS)
- add_library(WrapSystemPCRE2::WrapSystemPCRE2 INTERFACE IMPORTED)
- target_link_libraries(WrapSystemPCRE2::WrapSystemPCRE2 INTERFACE ${PCRE2_LIBRARIES})
- target_include_directories(WrapSystemPCRE2::WrapSystemPCRE2 INTERFACE ${PCRE2_INCLUDE_DIRS})
- set(WrapSystemPCRE2_FOUND TRUE)
+ set(__pcre2_found TRUE)
endif()
endif()
include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(WrapSystemPCRE2 DEFAULT_MSG WrapSystemPCRE2_FOUND)
+find_package_handle_standard_args(WrapSystemPCRE2
+ REQUIRED_VARS ${WrapSystemPCRE2_REQUIRED_VARS}
+ VERSION_VAR WrapSystemPCRE2_VERSION)
+if(WrapSystemPCRE2_FOUND)
+ add_library(WrapSystemPCRE2::WrapSystemPCRE2 INTERFACE IMPORTED)
+ if(TARGET "${__pcre2_target_name}")
+ target_link_libraries(WrapSystemPCRE2::WrapSystemPCRE2 INTERFACE "${__pcre2_target_name}")
+ else()
+ target_link_libraries(WrapSystemPCRE2::WrapSystemPCRE2 INTERFACE ${PCRE2_LIBRARIES})
+ target_include_directories(WrapSystemPCRE2::WrapSystemPCRE2 INTERFACE ${PCRE2_INCLUDE_DIRS})
+ endif()
+endif()
+unset(__pcre2_target_name)
+unset(__pcre2_found)
diff --git a/cmake/FindWrapSystemPNG.cmake b/cmake/FindWrapSystemPNG.cmake
index dc42c731fb..372a064ff4 100644
--- a/cmake/FindWrapSystemPNG.cmake
+++ b/cmake/FindWrapSystemPNG.cmake
@@ -1,29 +1,39 @@
# We can't create the same interface imported target multiple times, CMake will complain if we do
# that. This can happen if the find_package call is done in multiple different subdirectories.
if(TARGET WrapSystemPNG::WrapSystemPNG)
- set(WrapSystemPNG_FOUND ON)
+ set(WrapSystemPNG_FOUND TRUE)
return()
endif()
+set(WrapSystemPNG_REQUIRED_VARS __png_found)
-set(WrapSystemPNG_FOUND OFF)
+find_package(PNG ${${CMAKE_FIND_PACKAGE_NAME}_FIND_VERSION} QUIET)
-find_package(PNG QUIET)
-
-if(PNG_FOUND)
- set(potential_target_names PNG::PNG)
- foreach(target_name ${potential_target_names})
- if(TARGET ${target_name})
- set(WrapSystemPNG_FOUND ON)
- set(final_target_name ${target_name})
-
- add_library(WrapSystemPNG::WrapSystemPNG INTERFACE IMPORTED)
- target_link_libraries(WrapSystemPNG::WrapSystemPNG INTERFACE
- ${final_target_name})
+set(__png_target_name "PNG::PNG")
+if(PNG_FOUND AND TARGET "${__png_target_name}")
+ set(__png_found TRUE)
+ if(PNG_VERSION)
+ set(WrapSystemPNG_VERSION "${PNG_VERSION}")
+ endif()
+endif()
- break()
- endif()
- endforeach()
+if(PNG_LIBRARIES)
+ list(PREPEND WrapSystemPNG_REQUIRED_VARS PNG_LIBRARIES)
+endif()
+if(PNG_VERSION)
+ set(WrapSystemPNG_VERSION "${PNG_VERSION}")
+elseif(PNG_VERSION_STRING)
+ set(WrapSystemPNG_VERSION "${PNG_VERSION_STRING}")
endif()
include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(WrapSystemPNG DEFAULT_MSG WrapSystemPNG_FOUND)
+find_package_handle_standard_args(WrapSystemPNG
+ REQUIRED_VARS ${WrapSystemPNG_REQUIRED_VARS}
+ VERSION_VAR WrapSystemPNG_VERSION)
+
+if(WrapSystemPNG_FOUND)
+ add_library(WrapSystemPNG::WrapSystemPNG INTERFACE IMPORTED)
+ target_link_libraries(WrapSystemPNG::WrapSystemPNG
+ INTERFACE "${__png_target_name}")
+endif()
+unset(__png_target_name)
+unset(__png_found)
diff --git a/cmake/FindZSTD.cmake b/cmake/FindZSTD.cmake
index 57fe8d1c3a..11515c8a31 100644
--- a/cmake/FindZSTD.cmake
+++ b/cmake/FindZSTD.cmake
@@ -32,7 +32,8 @@ find_library(ZSTD_LIBRARIES
)
include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(ZSTD DEFAULT_MSG ZSTD_LIBRARIES ZSTD_INCLUDE_DIRS)
+find_package_handle_standard_args(ZSTD REQUIRED_VARS ZSTD_LIBRARIES ZSTD_INCLUDE_DIRS
+ VERSION_VAR PC_ZSTD_VERSION)
if(ZSTD_FOUND AND NOT TARGET ZSTD::ZSTD)
add_library(ZSTD::ZSTD UNKNOWN IMPORTED)
diff --git a/configure.cmake b/configure.cmake
index 2f5d320f62..34295b6918 100644
--- a/configure.cmake
+++ b/configure.cmake
@@ -6,9 +6,9 @@
#### Libraries
-qt_find_package(ZLIB PROVIDED_TARGETS ZLIB::ZLIB MODULE_NAME global QMAKE_LIB zlib)
-qt_find_package(ZSTD PROVIDED_TARGETS ZSTD::ZSTD MODULE_NAME global QMAKE_LIB zstd)
-qt_find_package(WrapDBus1 PROVIDED_TARGETS dbus-1 MODULE_NAME global QMAKE_LIB dbus)
+qt_find_package(ZLIB 1.0.8 PROVIDED_TARGETS ZLIB::ZLIB MODULE_NAME global QMAKE_LIB zlib)
+qt_find_package(ZSTD 1.3 PROVIDED_TARGETS ZSTD::ZSTD MODULE_NAME global QMAKE_LIB zstd)
+qt_find_package(WrapDBus1 1.2 PROVIDED_TARGETS dbus-1 MODULE_NAME global QMAKE_LIB dbus)
qt_find_package(Libudev PROVIDED_TARGETS PkgConfig::Libudev MODULE_NAME global QMAKE_LIB libudev)
diff --git a/src/corelib/configure.cmake b/src/corelib/configure.cmake
index 78d780994f..ec9f576db8 100644
--- a/src/corelib/configure.cmake
+++ b/src/corelib/configure.cmake
@@ -26,7 +26,7 @@ qt_find_package(Libb2 PROVIDED_TARGETS PkgConfig::Libb2 MODULE_NAME core QMAKE_L
qt_find_package(WrapRt PROVIDED_TARGETS WrapRt::WrapRt MODULE_NAME core QMAKE_LIB librt)
qt_find_package(LTTngUST PROVIDED_TARGETS LTTng::UST MODULE_NAME core QMAKE_LIB lttng-ust)
qt_add_qmake_lib_dependency(lttng-ust libdl)
-qt_find_package(WrapSystemPCRE2 PROVIDED_TARGETS WrapSystemPCRE2::WrapSystemPCRE2 MODULE_NAME core QMAKE_LIB pcre2)
+qt_find_package(WrapSystemPCRE2 10.20 PROVIDED_TARGETS WrapSystemPCRE2::WrapSystemPCRE2 MODULE_NAME core QMAKE_LIB pcre2)
set_package_properties(WrapPCRE2 PROPERTIES TYPE REQUIRED)
if((QNX) OR QT_FIND_ALL_PACKAGES_ALWAYS)
qt_find_package(PPS PROVIDED_TARGETS PPS::PPS MODULE_NAME core QMAKE_LIB pps)
diff --git a/src/gui/.prev_configure.cmake b/src/gui/.prev_configure.cmake
index 6a814fd329..22e366388a 100644
--- a/src/gui/.prev_configure.cmake
+++ b/src/gui/.prev_configure.cmake
@@ -30,7 +30,7 @@ qt_find_package(ATSPI2 PROVIDED_TARGETS PkgConfig::ATSPI2 MODULE_NAME gui QMAKE_
qt_find_package(DirectFB PROVIDED_TARGETS PkgConfig::DirectFB MODULE_NAME gui QMAKE_LIB directfb)
qt_find_package(Libdrm PROVIDED_TARGETS Libdrm::Libdrm MODULE_NAME gui QMAKE_LIB drm)
qt_find_package(EGL PROVIDED_TARGETS EGL::EGL MODULE_NAME gui QMAKE_LIB egl)
-qt_find_package(WrapSystemFreetype PROVIDED_TARGETS WrapSystemFreetype::WrapSystemFreetype MODULE_NAME gui QMAKE_LIB freetype)
+qt_find_package(WrapSystemFreetype 2.2.0 PROVIDED_TARGETS WrapSystemFreetype::WrapSystemFreetype MODULE_NAME gui QMAKE_LIB freetype)
set_package_properties(WrapFreetype PROPERTIES TYPE REQUIRED)
if(QT_FEATURE_system_zlib)
qt_add_qmake_lib_dependency(freetype zlib)
@@ -38,7 +38,7 @@ endif()
qt_find_package(Fontconfig PROVIDED_TARGETS Fontconfig::Fontconfig MODULE_NAME gui QMAKE_LIB fontconfig)
qt_add_qmake_lib_dependency(fontconfig freetype)
qt_find_package(gbm PROVIDED_TARGETS gbm::gbm MODULE_NAME gui QMAKE_LIB gbm)
-qt_find_package(WrapSystemHarfbuzz PROVIDED_TARGETS WrapSystemHarfbuzz::WrapSystemHarfbuzz MODULE_NAME gui QMAKE_LIB harfbuzz)
+qt_find_package(WrapSystemHarfbuzz 2.6.0 PROVIDED_TARGETS WrapSystemHarfbuzz::WrapSystemHarfbuzz MODULE_NAME gui QMAKE_LIB harfbuzz)
qt_find_package(Libinput PROVIDED_TARGETS Libinput::Libinput MODULE_NAME gui QMAKE_LIB libinput)
qt_find_package(JPEG PROVIDED_TARGETS JPEG::JPEG MODULE_NAME gui QMAKE_LIB libjpeg)
qt_find_package(WrapSystemPNG PROVIDED_TARGETS WrapSystemPNG::WrapSystemPNG MODULE_NAME gui QMAKE_LIB libpng)
diff --git a/src/gui/configure.cmake b/src/gui/configure.cmake
index cfefd2ebc3..e09cd64ee4 100644
--- a/src/gui/configure.cmake
+++ b/src/gui/configure.cmake
@@ -30,7 +30,7 @@ qt_find_package(ATSPI2 PROVIDED_TARGETS PkgConfig::ATSPI2 MODULE_NAME gui QMAKE_
qt_find_package(DirectFB PROVIDED_TARGETS PkgConfig::DirectFB MODULE_NAME gui QMAKE_LIB directfb)
qt_find_package(Libdrm PROVIDED_TARGETS Libdrm::Libdrm MODULE_NAME gui QMAKE_LIB drm)
qt_find_package(EGL PROVIDED_TARGETS EGL::EGL MODULE_NAME gui QMAKE_LIB egl)
-qt_find_package(WrapSystemFreetype PROVIDED_TARGETS WrapSystemFreetype::WrapSystemFreetype MODULE_NAME gui QMAKE_LIB freetype)
+qt_find_package(WrapSystemFreetype 2.2.0 PROVIDED_TARGETS WrapSystemFreetype::WrapSystemFreetype MODULE_NAME gui QMAKE_LIB freetype)
set_package_properties(WrapFreetype PROPERTIES TYPE REQUIRED)
if(QT_FEATURE_system_zlib)
qt_add_qmake_lib_dependency(freetype zlib)
@@ -38,7 +38,7 @@ endif()
qt_find_package(Fontconfig PROVIDED_TARGETS Fontconfig::Fontconfig MODULE_NAME gui QMAKE_LIB fontconfig)
qt_add_qmake_lib_dependency(fontconfig freetype)
qt_find_package(gbm PROVIDED_TARGETS gbm::gbm MODULE_NAME gui QMAKE_LIB gbm)
-qt_find_package(WrapSystemHarfbuzz PROVIDED_TARGETS WrapSystemHarfbuzz::WrapSystemHarfbuzz MODULE_NAME gui QMAKE_LIB harfbuzz)
+qt_find_package(WrapSystemHarfbuzz 2.6.0 PROVIDED_TARGETS WrapSystemHarfbuzz::WrapSystemHarfbuzz MODULE_NAME gui QMAKE_LIB harfbuzz)
qt_find_package(Libinput PROVIDED_TARGETS Libinput::Libinput MODULE_NAME gui QMAKE_LIB libinput)
qt_find_package(JPEG PROVIDED_TARGETS JPEG::JPEG MODULE_NAME gui QMAKE_LIB libjpeg)
qt_find_package(WrapSystemPNG PROVIDED_TARGETS WrapSystemPNG::WrapSystemPNG MODULE_NAME gui QMAKE_LIB libpng)
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"),