CMake: pro2cmake: Specify library versions for 3rd party libs part 2
Embed package versions into the qt_find_package calls for various Linux specific packages. Task-number: QTBUG-82917 Change-Id: I5d1cb623f81932dfae4658b8a3a89eedb71ea3af Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
parent
3c52f8af9d
commit
ecc72bc63d
@ -1,7 +1,12 @@
|
||||
find_package(PkgConfig QUIET)
|
||||
|
||||
pkg_check_modules(GTK3 "gtk+-3.0 >= 3.6" IMPORTED_TARGET)
|
||||
set(__gtk3_required_version "${${CMAKE_FIND_PACKAGE_NAME}_FIND_VERSION}")
|
||||
if(__gtk3_required_version)
|
||||
set(__gtk3_required_version " >= ${__gtk3_required_version}")
|
||||
endif()
|
||||
pkg_check_modules(GTK3 "gtk+-3.0${__gtk3_required_version}" IMPORTED_TARGET)
|
||||
|
||||
if (NOT TARGET PkgConfig::GTK3)
|
||||
set(GTK3_FOUND 0)
|
||||
endif()
|
||||
unset(__gtk3_required_version)
|
||||
|
@ -60,22 +60,22 @@ if((LINUX) OR QT_FIND_ALL_PACKAGES_ALWAYS)
|
||||
qt_find_package(X11 PROVIDED_TARGETS ${X11_SM_LIB} ${X11_ICE_LIB} MODULE_NAME gui QMAKE_LIB x11sm)
|
||||
endif()
|
||||
if((LINUX) OR QT_FIND_ALL_PACKAGES_ALWAYS)
|
||||
qt_find_package(XCB 1.9 PROVIDED_TARGETS XCB::XCB MODULE_NAME gui QMAKE_LIB xcb)
|
||||
qt_find_package(XCB 1.11 PROVIDED_TARGETS XCB::XCB MODULE_NAME gui QMAKE_LIB xcb)
|
||||
endif()
|
||||
if((LINUX) OR QT_FIND_ALL_PACKAGES_ALWAYS)
|
||||
qt_find_package(XCB COMPONENTS ICCCM PROVIDED_TARGETS XCB::ICCCM MODULE_NAME gui QMAKE_LIB xcb_icccm)
|
||||
qt_find_package(XCB 0.3.9 COMPONENTS ICCCM PROVIDED_TARGETS XCB::ICCCM MODULE_NAME gui QMAKE_LIB xcb_icccm)
|
||||
endif()
|
||||
qt_add_qmake_lib_dependency(xcb_icccm xcb)
|
||||
if((LINUX) OR QT_FIND_ALL_PACKAGES_ALWAYS)
|
||||
qt_find_package(XCB COMPONENTS IMAGE PROVIDED_TARGETS XCB::IMAGE MODULE_NAME gui QMAKE_LIB xcb_image)
|
||||
qt_find_package(XCB 0.3.9 COMPONENTS IMAGE PROVIDED_TARGETS XCB::IMAGE MODULE_NAME gui QMAKE_LIB xcb_image)
|
||||
endif()
|
||||
qt_add_qmake_lib_dependency(xcb_image xcb_shm xcb)
|
||||
if((LINUX) OR QT_FIND_ALL_PACKAGES_ALWAYS)
|
||||
qt_find_package(XCB COMPONENTS KEYSYMS PROVIDED_TARGETS XCB::KEYSYMS MODULE_NAME gui QMAKE_LIB xcb_keysyms)
|
||||
qt_find_package(XCB 0.3.9 COMPONENTS KEYSYMS PROVIDED_TARGETS XCB::KEYSYMS MODULE_NAME gui QMAKE_LIB xcb_keysyms)
|
||||
endif()
|
||||
qt_add_qmake_lib_dependency(xcb_keysyms xcb)
|
||||
if((LINUX) OR QT_FIND_ALL_PACKAGES_ALWAYS)
|
||||
qt_find_package(XCB COMPONENTS RENDERUTIL PROVIDED_TARGETS XCB::RENDERUTIL MODULE_NAME gui QMAKE_LIB xcb_renderutil)
|
||||
qt_find_package(XCB 0.3.9 COMPONENTS RENDERUTIL PROVIDED_TARGETS XCB::RENDERUTIL MODULE_NAME gui QMAKE_LIB xcb_renderutil)
|
||||
endif()
|
||||
qt_add_qmake_lib_dependency(xcb_renderutil xcb xcb_render)
|
||||
if((LINUX) OR QT_FIND_ALL_PACKAGES_ALWAYS)
|
||||
@ -119,17 +119,17 @@ if((LINUX) OR QT_FIND_ALL_PACKAGES_ALWAYS)
|
||||
endif()
|
||||
qt_add_qmake_lib_dependency(xcb_glx xcb)
|
||||
if((LINUX) OR QT_FIND_ALL_PACKAGES_ALWAYS)
|
||||
qt_find_package(XCB COMPONENTS XINPUT PROVIDED_TARGETS XCB::XINPUT MODULE_NAME gui QMAKE_LIB xcb_xinput)
|
||||
qt_find_package(XCB 1.12 COMPONENTS XINPUT PROVIDED_TARGETS XCB::XINPUT MODULE_NAME gui QMAKE_LIB xcb_xinput)
|
||||
endif()
|
||||
qt_add_qmake_lib_dependency(xcb_xinput xcb)
|
||||
if((LINUX) OR QT_FIND_ALL_PACKAGES_ALWAYS)
|
||||
qt_find_package(XKB 0.4.1 PROVIDED_TARGETS XKB::XKB MODULE_NAME gui QMAKE_LIB xkbcommon)
|
||||
qt_find_package(XKB 0.5.0 PROVIDED_TARGETS XKB::XKB MODULE_NAME gui QMAKE_LIB xkbcommon)
|
||||
endif()
|
||||
if((LINUX) OR QT_FIND_ALL_PACKAGES_ALWAYS)
|
||||
qt_find_package(XKB_COMMON_X11 0.4.1 PROVIDED_TARGETS PkgConfig::XKB_COMMON_X11 MODULE_NAME gui QMAKE_LIB xkbcommon_x11)
|
||||
qt_find_package(XKB_COMMON_X11 0.5.0 PROVIDED_TARGETS PkgConfig::XKB_COMMON_X11 MODULE_NAME gui QMAKE_LIB xkbcommon_x11)
|
||||
endif()
|
||||
if((LINUX) OR QT_FIND_ALL_PACKAGES_ALWAYS)
|
||||
qt_find_package(XRender PROVIDED_TARGETS PkgConfig::XRender MODULE_NAME gui QMAKE_LIB xrender)
|
||||
qt_find_package(XRender 0.6 PROVIDED_TARGETS PkgConfig::XRender MODULE_NAME gui QMAKE_LIB xrender)
|
||||
endif()
|
||||
qt_add_qmake_lib_dependency(xrender xlib)
|
||||
|
||||
|
@ -60,22 +60,22 @@ if((LINUX) OR QT_FIND_ALL_PACKAGES_ALWAYS)
|
||||
qt_find_package(X11 PROVIDED_TARGETS ${X11_SM_LIB} ${X11_ICE_LIB} MODULE_NAME gui QMAKE_LIB x11sm)
|
||||
endif()
|
||||
if((LINUX) OR QT_FIND_ALL_PACKAGES_ALWAYS)
|
||||
qt_find_package(XCB 1.9 PROVIDED_TARGETS XCB::XCB MODULE_NAME gui QMAKE_LIB xcb)
|
||||
qt_find_package(XCB 1.11 PROVIDED_TARGETS XCB::XCB MODULE_NAME gui QMAKE_LIB xcb)
|
||||
endif()
|
||||
if((LINUX) OR QT_FIND_ALL_PACKAGES_ALWAYS)
|
||||
qt_find_package(XCB COMPONENTS ICCCM PROVIDED_TARGETS XCB::ICCCM MODULE_NAME gui QMAKE_LIB xcb_icccm)
|
||||
qt_find_package(XCB 0.3.9 COMPONENTS ICCCM PROVIDED_TARGETS XCB::ICCCM MODULE_NAME gui QMAKE_LIB xcb_icccm)
|
||||
endif()
|
||||
qt_add_qmake_lib_dependency(xcb_icccm xcb)
|
||||
if((LINUX) OR QT_FIND_ALL_PACKAGES_ALWAYS)
|
||||
qt_find_package(XCB COMPONENTS IMAGE PROVIDED_TARGETS XCB::IMAGE MODULE_NAME gui QMAKE_LIB xcb_image)
|
||||
qt_find_package(XCB 0.3.9 COMPONENTS IMAGE PROVIDED_TARGETS XCB::IMAGE MODULE_NAME gui QMAKE_LIB xcb_image)
|
||||
endif()
|
||||
qt_add_qmake_lib_dependency(xcb_image xcb_shm xcb)
|
||||
if((LINUX) OR QT_FIND_ALL_PACKAGES_ALWAYS)
|
||||
qt_find_package(XCB COMPONENTS KEYSYMS PROVIDED_TARGETS XCB::KEYSYMS MODULE_NAME gui QMAKE_LIB xcb_keysyms)
|
||||
qt_find_package(XCB 0.3.9 COMPONENTS KEYSYMS PROVIDED_TARGETS XCB::KEYSYMS MODULE_NAME gui QMAKE_LIB xcb_keysyms)
|
||||
endif()
|
||||
qt_add_qmake_lib_dependency(xcb_keysyms xcb)
|
||||
if((LINUX) OR QT_FIND_ALL_PACKAGES_ALWAYS)
|
||||
qt_find_package(XCB COMPONENTS RENDERUTIL PROVIDED_TARGETS XCB::RENDERUTIL MODULE_NAME gui QMAKE_LIB xcb_renderutil)
|
||||
qt_find_package(XCB 0.3.9 COMPONENTS RENDERUTIL PROVIDED_TARGETS XCB::RENDERUTIL MODULE_NAME gui QMAKE_LIB xcb_renderutil)
|
||||
endif()
|
||||
qt_add_qmake_lib_dependency(xcb_renderutil xcb xcb_render)
|
||||
if((LINUX) OR QT_FIND_ALL_PACKAGES_ALWAYS)
|
||||
@ -119,17 +119,17 @@ if((LINUX) OR QT_FIND_ALL_PACKAGES_ALWAYS)
|
||||
endif()
|
||||
qt_add_qmake_lib_dependency(xcb_glx xcb)
|
||||
if((LINUX) OR QT_FIND_ALL_PACKAGES_ALWAYS)
|
||||
qt_find_package(XCB COMPONENTS XINPUT PROVIDED_TARGETS XCB::XINPUT MODULE_NAME gui QMAKE_LIB xcb_xinput)
|
||||
qt_find_package(XCB 1.12 COMPONENTS XINPUT PROVIDED_TARGETS XCB::XINPUT MODULE_NAME gui QMAKE_LIB xcb_xinput)
|
||||
endif()
|
||||
qt_add_qmake_lib_dependency(xcb_xinput xcb)
|
||||
if((LINUX) OR QT_FIND_ALL_PACKAGES_ALWAYS)
|
||||
qt_find_package(XKB 0.4.1 PROVIDED_TARGETS XKB::XKB MODULE_NAME gui QMAKE_LIB xkbcommon)
|
||||
qt_find_package(XKB 0.5.0 PROVIDED_TARGETS XKB::XKB MODULE_NAME gui QMAKE_LIB xkbcommon)
|
||||
endif()
|
||||
if((LINUX) OR QT_FIND_ALL_PACKAGES_ALWAYS)
|
||||
qt_find_package(XKB_COMMON_X11 0.4.1 PROVIDED_TARGETS PkgConfig::XKB_COMMON_X11 MODULE_NAME gui QMAKE_LIB xkbcommon_x11)
|
||||
qt_find_package(XKB_COMMON_X11 0.5.0 PROVIDED_TARGETS PkgConfig::XKB_COMMON_X11 MODULE_NAME gui QMAKE_LIB xkbcommon_x11)
|
||||
endif()
|
||||
if((LINUX) OR QT_FIND_ALL_PACKAGES_ALWAYS)
|
||||
qt_find_package(XRender PROVIDED_TARGETS PkgConfig::XRender MODULE_NAME gui QMAKE_LIB xrender)
|
||||
qt_find_package(XRender 0.6 PROVIDED_TARGETS PkgConfig::XRender MODULE_NAME gui QMAKE_LIB xrender)
|
||||
endif()
|
||||
qt_add_qmake_lib_dependency(xrender xlib)
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
#### Libraries
|
||||
|
||||
qt_find_package(GTK3 PROVIDED_TARGETS PkgConfig::GTK3 MODULE_NAME widgets QMAKE_LIB gtk3)
|
||||
qt_find_package(GTK3 3.6 PROVIDED_TARGETS PkgConfig::GTK3 MODULE_NAME widgets QMAKE_LIB gtk3)
|
||||
|
||||
|
||||
#### Tests
|
||||
|
@ -398,7 +398,7 @@ _library_map = [
|
||||
LibraryMapping("gbm", "gbm", "gbm::gbm"),
|
||||
LibraryMapping("glib", "GLIB2", "GLIB2::GLIB2"),
|
||||
LibraryMapping("iconv", "WrapIconv", "WrapIconv::WrapIconv"),
|
||||
LibraryMapping("gtk3", "GTK3", "PkgConfig::GTK3"),
|
||||
LibraryMapping("gtk3", "GTK3", "PkgConfig::GTK3", extra=["3.6"]),
|
||||
LibraryMapping("gssapi", "GSSAPI", "GSSAPI::GSSAPI"),
|
||||
LibraryMapping(
|
||||
"harfbuzz", "WrapHarfbuzz", "WrapHarfbuzz::WrapHarfbuzz", is_bundled_with_qt=True,
|
||||
@ -473,7 +473,7 @@ _library_map = [
|
||||
"xcb",
|
||||
"XCB",
|
||||
"XCB::XCB",
|
||||
extra=["1.9"],
|
||||
extra=["1.11"],
|
||||
resultVariable="TARGET XCB::XCB",
|
||||
appendFoundSuffix=False,
|
||||
),
|
||||
@ -481,16 +481,16 @@ _library_map = [
|
||||
"xcb_glx", "XCB", "XCB::GLX", extra=["COMPONENTS", "GLX"], resultVariable="XCB_GLX"
|
||||
),
|
||||
LibraryMapping(
|
||||
"xcb_icccm", "XCB", "XCB::ICCCM", extra=["COMPONENTS", "ICCCM"], resultVariable="XCB_ICCCM"
|
||||
"xcb_icccm", "XCB", "XCB::ICCCM", extra=["0.3.9", "COMPONENTS", "ICCCM"], resultVariable="XCB_ICCCM"
|
||||
),
|
||||
LibraryMapping(
|
||||
"xcb_image", "XCB", "XCB::IMAGE", extra=["COMPONENTS", "IMAGE"], resultVariable="XCB_IMAGE"
|
||||
"xcb_image", "XCB", "XCB::IMAGE", extra=["0.3.9", "COMPONENTS", "IMAGE"], resultVariable="XCB_IMAGE"
|
||||
),
|
||||
LibraryMapping(
|
||||
"xcb_keysyms",
|
||||
"XCB",
|
||||
"XCB::KEYSYMS",
|
||||
extra=["COMPONENTS", "KEYSYMS"],
|
||||
extra=["0.3.9", "COMPONENTS", "KEYSYMS"],
|
||||
resultVariable="XCB_KEYSYMS",
|
||||
),
|
||||
LibraryMapping(
|
||||
@ -507,7 +507,7 @@ _library_map = [
|
||||
"xcb_renderutil",
|
||||
"XCB",
|
||||
"XCB::RENDERUTIL",
|
||||
extra=["COMPONENTS", "RENDERUTIL"],
|
||||
extra=["0.3.9", "COMPONENTS", "RENDERUTIL"],
|
||||
resultVariable="XCB_RENDERUTIL",
|
||||
),
|
||||
LibraryMapping(
|
||||
@ -544,7 +544,7 @@ _library_map = [
|
||||
"xcb_xinput",
|
||||
"XCB",
|
||||
"XCB::XINPUT",
|
||||
extra=["COMPONENTS", "XINPUT"],
|
||||
extra=["1.12", "COMPONENTS", "XINPUT"],
|
||||
resultVariable="XCB_XINPUT",
|
||||
),
|
||||
LibraryMapping(
|
||||
@ -552,11 +552,11 @@ _library_map = [
|
||||
),
|
||||
LibraryMapping("xcb_xlib", "X11_XCB", "X11::XCB"),
|
||||
LibraryMapping("xcomposite", "XComposite", "PkgConfig::XComposite"),
|
||||
LibraryMapping("xkbcommon_evdev", "XKB", "XKB::XKB", extra=["0.4.1"]), # see also xkbcommon
|
||||
LibraryMapping("xkbcommon_x11", "XKB_COMMON_X11", "PkgConfig::XKB_COMMON_X11", extra=["0.4.1"]),
|
||||
LibraryMapping("xkbcommon", "XKB", "XKB::XKB", extra=["0.4.1"]),
|
||||
LibraryMapping("xkbcommon_evdev", "XKB", "XKB::XKB", extra=["0.5.0"]), # see also xkbcommon
|
||||
LibraryMapping("xkbcommon_x11", "XKB_COMMON_X11", "PkgConfig::XKB_COMMON_X11", extra=["0.5.0"]),
|
||||
LibraryMapping("xkbcommon", "XKB", "XKB::XKB", extra=["0.5.0"]),
|
||||
LibraryMapping("xlib", "X11", "X11::X11"),
|
||||
LibraryMapping("xrender", "XRender", "PkgConfig::XRender"),
|
||||
LibraryMapping("xrender", "XRender", "PkgConfig::XRender", extra=["0.6"]),
|
||||
LibraryMapping("zlib", "ZLIB", "ZLIB::ZLIB", extra=["1.0.8"]),
|
||||
LibraryMapping("zstd", "ZSTD", "ZSTD::ZSTD", extra=["1.3"]),
|
||||
LibraryMapping("tiff", "TIFF", "TIFF::TIFF"),
|
||||
|
Loading…
Reference in New Issue
Block a user