aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2021-05-06 15:48:02 -0700
committerGerald Combs <gerald@wireshark.org>2021-05-06 19:14:15 -0700
commit826e03c9f4be379eb01afb51fcdc5276b8903a48 (patch)
tree3cf8ed3150ab55c2774294071dd94e8318cc9979 /CMakeLists.txt
parent0c3db4c9fda730acb9efe8a9667c9b5b2aa03adf (diff)
CMake: Apply AUTO{MOC,UIC,RCC} more selectively.
Set CMAKE_AUTO{MOC,UIC,RCC} if we're running CMake 3.20.0 or 3.20.1 in order to work around CMake issue 22085, otherwise set the AUTOMOC, AUTOUIC, and AUTORCC properties for the qtui target. The latter is preferred since it keeps us from running Qt's meta-object, user interface, or resource compilers on code outside of ui/qt. Ping #17314.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt3
1 files changed, 2 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4b0c604543..f0e8e0602a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1151,7 +1151,8 @@ ws_find_package(Systemd BUILD_sdjournal HAVE_SYSTEMD)
# Build the Qt GUI?
if(BUILD_wireshark)
- if(NOT CMAKE_VERSION VERSION_LESS "3.10.0")
+ if(CMAKE_VERSION VERSION_GREATER "3.19.999" AND CMAKE_VERSION VERSION_LESS "3.20.2")
+ # https://gitlab.kitware.com/cmake/cmake/-/issues/22085
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)