CMake: Enable AUTO{MOC,UIC,RCC} earlier.

Enable CMAKE_AUTOMOC, CMAKE_AUTOUIC, and CMAKE_AUTORCC before searching
for Qt packages. This is apparently required for CMake 3.20.0 and later.
Fixes #17314.

(cherry picked from commit be2b0fc810)

 Conflicts:
	ui/qt/CMakeLists.txt
This commit is contained in:
Gerald Combs 2021-03-26 12:52:01 -07:00 committed by Gerald Combs
parent 3bca4e3b3f
commit 6ef6e8f607
2 changed files with 4 additions and 4 deletions

View File

@ -1115,6 +1115,10 @@ ws_find_package(Systemd BUILD_sdjournal HAVE_SYSTEMD)
# Build the Qt GUI?
if(BUILD_wireshark)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)
# Untested, may not work if CMAKE_PREFIX_PATH gets overwritten
# somewhere. The if WIN32 in this place is annoying as well.
if(WIN32)

View File

@ -631,10 +631,6 @@ include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
)
set(CMAKE_AUTOMOC TRUE)
set(CMAKE_AUTOUIC TRUE)
set(CMAKE_AUTORCC TRUE)
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