aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2022-03-21 12:07:13 -0700
committerGerald Combs <gerald@wireshark.org>2022-03-22 22:01:33 +0000
commit829fb032e4ceadf06195d76de875cd3afefbd52a (patch)
treed6aa5a250a621712a1932b81fd0711a220769faa /CMakeLists.txt
parent0a351fb6ba2a267bbacc17f6f14f089909097b11 (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.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt14
1 files changed, 9 insertions, 5 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