diff options
author | Michal Klocek <michal.klocek@qt.io> | 2024-04-08 14:38:41 +0200 |
---|---|---|
committer | Michal Klocek <michal.klocek@qt.io> | 2024-04-12 11:47:47 +0000 |
commit | f0ef01353938898709da7ae3810d60a8c50ba3de (patch) | |
tree | ee1daed903cd45d012e64395026853f54e77ad47 | |
parent | 5dacea720ed6a4239c522056978fa28947777497 (diff) |
Improve qpa-xcb error message
Add quick fix before new qt configure checks are integrated.
Make missing ozone x11 libs as a warning in case qt base is
compiled with xcb as it is optional.
Task-number: QTBUG-120247
Change-Id: I43b280a37b6b580c4f9bb247efc39f4532ea981f
Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
-rw-r--r-- | configure.cmake | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/configure.cmake b/configure.cmake index a9f659533..9f4831257 100644 --- a/configure.cmake +++ b/configure.cmake @@ -559,21 +559,7 @@ add_check_for_support( CONDITION NOT LINUX OR NOT QT_FEATURE_webengine_system_ffmpeg OR TEST_libavformat MESSAGE "Unmodified ffmpeg >= 5.0 is not supported." ) -# FIXME: This prevents non XCB Linux builds from building: -set(xcbSupport X11 LIBDRM XCOMPOSITE XCURSOR XRANDR XI XPROTO XSHMFENCE XTST) -foreach(xs ${xcbSupport}) - if(${xs}_FOUND) - set(xcbErrorMessage "${xcbErrorMessage} ${xs}:YES") - else() - set(xcbErrorMessage "${xcbErrorMessage} ${xs}:NO") - endif() -endforeach() -add_check_for_support( - MODULES QtWebEngine - CONDITION NOT LINUX OR NOT QT_FEATURE_xcb OR QT_FEATURE_webengine_ozone_x11 - MESSAGE "Could not find all necessary libraries for qpa-xcb support.\ -${xcbErrorMessage}" -) + add_check_for_support( MODULES QtWebEngine CONDITION MSVC OR @@ -698,6 +684,25 @@ qt_configure_add_report_entry( MESSAGE "Building fat libray with device and simulator architectures will disable NEON." CONDITION IOS AND simulator AND device AND QT_FEATURE_qtpdf_build ) + +if(LINUX AND QT_FEATURE_xcb AND TARGET Qt::Gui) + set(ozone_x11_support X11 LIBDRM XCOMPOSITE XCURSOR XRANDR XI XPROTO XSHMFENCE XTST) + set(ozone_x11_error OFF) + foreach(xs ${ozone_x11_support}) + if(NOT ${xs}_FOUND) + set(ozone_x11_error ON) + set(ozone_x11_error_message "${ozone_x11_error_message}\n-- ${xs} libray not found") + endif() + endforeach() + if(ozone_x11_error) + qt_configure_add_report_entry( + TYPE WARNING + MESSAGE + "Could not find all necessary libraries for qpa-xcb support.${ozone_x11_error_message}" + ) + endif() +endif() + if(PRINT_BFD_LINKER_WARNING) qt_configure_add_report_entry( TYPE WARNING |