diff options
author | Gerald Combs <gerald@wireshark.org> | 2021-03-31 11:30:45 -0700 |
---|---|---|
committer | Gerald Combs <gerald@zing.org> | 2021-04-19 12:27:02 -0700 |
commit | 19d03ef4acda8d8952fd441abc54b732035b9535 (patch) | |
tree | ab425a61abc25070928deb6b106807024d7057c8 /ui | |
parent | eee907aeb5e6d7548d413d69fd1122411a05390f (diff) |
CMake: Enable AUTO{MOC,UIC,RCC} according to our CMake version.
As noted in be2b0fc810, we need to set CMAKE_AUTO* before searching for
Qt packages when using 3.20.0 and later. However, this fails if we're
using CMake 3.9.6 or earlier. Set CMAKE_AUTO* where needed depending on
our CMake version.
Ping #17314.
(cherry picked from commit a80ea46ff7f19e4c7f9ade4970b0f2a2202f2ea2)
Conflicts:
ui/qt/CMakeLists.txt
Diffstat (limited to 'ui')
-rw-r--r-- | ui/qt/CMakeLists.txt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ui/qt/CMakeLists.txt b/ui/qt/CMakeLists.txt index cd36913f10..1bcbe318d9 100644 --- a/ui/qt/CMakeLists.txt +++ b/ui/qt/CMakeLists.txt @@ -631,6 +631,12 @@ include_directories( ${CMAKE_CURRENT_SOURCE_DIR} ) +if(CMAKE_VERSION VERSION_LESS "3.10.0") + set(CMAKE_AUTOMOC ON) + set(CMAKE_AUTOUIC ON) + set(CMAKE_AUTORCC ON) +endif() + if(NOT Qt5Widgets_VERSION VERSION_LESS "5.9") # Drop the file modification time of source files from generated files # to help with reproducible builds. We do not use QFileInfo.lastModified |