aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorJoão Valverde <j@v6e.pt>2022-08-26 09:42:28 +0100
committerA Wireshark GitLab Utility <gerald+gitlab-utility@wireshark.org>2022-08-26 09:55:41 +0000
commit867a068332e9f12c717bd7cdf2b3b8d8a55eb396 (patch)
treeb7d65edf6e668611e6ba693fb1e44fd3ea942883 /CMakeLists.txt
parentfc952ac2f16add3bd947f7e2d888c53a65c8dbd0 (diff)
CMake: Add back a Wireshark env var to configure Qt
Use the variables WIRESHARK_QT{5,6}_PREFIX_PATH. This allows having Qt5 and Qt6 paths configured isimultaneously and switch easily between them. Use list(APPEND) to avoid clobbering other CMAKE_PREFIX_PATH paths. Follow-up to b33210750c1fc38fe4ee827443e2c8a3aeaafc88.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt7
1 files changed, 6 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4384cbb564..e9a3ebdd99 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1185,10 +1185,15 @@ ws_find_package(Systemd BUILD_sdjournal HAVE_SYSTEMD)
if(BUILD_wireshark OR BUILD_logray)
if(USE_qt6)
set(qtver "6")
+ if(DEFINED ENV{WIRESHARK_QT6_PREFIX_PATH})
+ list(APPEND CMAKE_PREFIX_PATH $ENV{WIRESHARK_QT6_PREFIX_PATH})
+ endif()
else()
set(qtver "5")
+ if(DEFINED ENV{WIRESHARK_QT5_PREFIX_PATH})
+ list(APPEND CMAKE_PREFIX_PATH $ENV{WIRESHARK_QT5_PREFIX_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})
+ elseif(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}")