diff options
author | Gerald Combs <gerald@wireshark.org> | 2022-03-21 12:07:13 -0700 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2022-03-22 22:01:33 +0000 |
commit | 829fb032e4ceadf06195d76de875cd3afefbd52a (patch) | |
tree | d6aa5a250a621712a1932b81fd0711a220769faa | |
parent | 0a351fb6ba2a267bbacc17f6f14f089909097b11 (diff) |
CMake: Add support for WIRESHARK_QT6_PREFIX_PATH.
If USE_qt6 is enabled, set CMAKE_PREFIX_PATH to WIRESHARK_QT6_PREFIX_PATH
if it's defined. This lets you more easily switch between Qt 5 and
6 builds. Note that we have experimental support for Qt 6 in the
Developer's Guide.
-rw-r--r-- | CMakeLists.txt | 14 | ||||
-rw-r--r-- | docbook/wsdg_src/WSDG_chapter_libraries.adoc | 4 | ||||
-rw-r--r-- | docbook/wsdg_src/WSDG_chapter_quick_setup.adoc | 7 |
3 files changed, 16 insertions, 9 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 511d8a4673..abc789ec00 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1182,13 +1182,17 @@ ws_find_package(Systemd BUILD_sdjournal HAVE_SYSTEMD) if(BUILD_wireshark) if(USE_qt6) set(qtver "6") + if(DEFINED ENV{WIRESHARK_QT6_PREFIX_PATH}) + set(CMAKE_PREFIX_PATH $ENV{WIRESHARK_QT6_PREFIX_PATH}) + endif() else() set(qtver "5") - endif() - # We used to recommend setting QT5_BASE_DIR and should probably deprecate this at some point. - if(WIN32) - set(QT5_BASE_PATH "$ENV{QT5_BASE_DIR}") - set(CMAKE_PREFIX_PATH "${QT5_BASE_PATH}") + # XXX We used to recommend setting QT5_BASE_DIR. Remove after the 4.0 branch is created. + if(WIN32 AND DEFINED ENV{QT5_BASE_DIR}) + message(WARNING "Support for QT5_BASE_DIR will be removed in a future release.") + set(QT5_BASE_PATH "$ENV{QT5_BASE_DIR}") + set(CMAKE_PREFIX_PATH "${QT5_BASE_PATH}") + endif() endif() if(APPLE AND EXISTS /usr/local/opt/qt5) # Homebrew installs Qt5 (up to at least 5.11.0) in diff --git a/docbook/wsdg_src/WSDG_chapter_libraries.adoc b/docbook/wsdg_src/WSDG_chapter_libraries.adoc index bd50ef0b42..2b8016ef10 100644 --- a/docbook/wsdg_src/WSDG_chapter_libraries.adoc +++ b/docbook/wsdg_src/WSDG_chapter_libraries.adoc @@ -77,8 +77,8 @@ must be set appropriately. === Qt -The Qt library is used to build the UI for Wireshark and is used to provide a -platform independent UI. Wireshark can be built with Qt 5.3 or later. +The Qt library is used to build the UI for Wireshark and is used to provide a platform independent UI. +Wireshark can be built with Qt 5.6 or later and has experimental support for Qt 6. For more information on the Qt libraries, see <<ChUIQt>>. diff --git a/docbook/wsdg_src/WSDG_chapter_quick_setup.adoc b/docbook/wsdg_src/WSDG_chapter_quick_setup.adoc index 7a461dd676..c5ca773a38 100644 --- a/docbook/wsdg_src/WSDG_chapter_quick_setup.adoc +++ b/docbook/wsdg_src/WSDG_chapter_quick_setup.adoc @@ -298,8 +298,11 @@ Note that installation of separate Qt components are required for 64 bit and 32 The components are forward compatible; you can build Wireshark using Qt’s “msvc2019 64-bit” and Visual {cpp} 2022. The environment variable `https://doc.qt.io/qt-5/cmake-get-started.html[CMAKE_PREFIX_PATH]` should be set as appropriate for your environment and should point to the Qt installation directory, e.g. _C:\Qt{backslash}{qt-lts-version}.2\msvc2019_64_ -The Qt maintenance tool (_C:\Qt\MaintenanceTool.exe_) can be used to -upgrade Qt to newer versions. +Wireshark has experimental support for Qt 6. +If you would like to build Wireshark with Qt 6 you must install it along with the “Qt5 Compatibility Module” component and and pass `-DUSE_qt6=ON` to cmake. +You can optionally set the `WIRESHARK_QT6_PREFIX_PATH` environment variable to your Qt 6 installation directory instead of `CMAKE_PREFIX_PATH`. + +The Qt maintenance tool (_C:\Qt\MaintenanceTool.exe_) can be used to upgrade Qt to newer versions. [#ChSetupPython] |