CMake: Update autogen properties.

Set the AUTOMOC, AUTOUIC, and AUTORCC properties for the qtui and
wireshark targets to match what we currently do in master. This should
keep us from running moc and uic on unwanted targets.
This commit is contained in:
Gerald Combs 2021-05-25 14:04:51 -07:00 committed by Gerald Combs
parent 113062025d
commit 13546c7a18
2 changed files with 6 additions and 6 deletions

View File

@ -1115,12 +1115,6 @@ ws_find_package(Systemd BUILD_sdjournal HAVE_SYSTEMD)
# Build the Qt GUI?
if(BUILD_wireshark)
if(NOT CMAKE_VERSION VERSION_LESS "3.10.0")
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)
endif()
# Untested, may not work if CMAKE_PREFIX_PATH gets overwritten
# somewhere. The if WIN32 in this place is annoying as well.
if(WIN32)
@ -2387,6 +2381,9 @@ if(BUILD_wireshark AND QT_FOUND)
LINK_FLAGS "${WS_LINK_FLAGS}"
FOLDER "Executables"
INSTALL_RPATH "${EXECUTABLE_INSTALL_RPATH}"
AUTOMOC ON
AUTOUIC ON
AUTORCC ON
)
if(ENABLE_APPLICATION_BUNDLE OR WIN32)
set_target_properties(wireshark PROPERTIES OUTPUT_NAME Wireshark)

View File

@ -728,6 +728,9 @@ target_compile_definitions(qtui
set_target_properties(qtui PROPERTIES
LINK_FLAGS "${WS_LINK_FLAGS}"
FOLDER "UI"
AUTOMOC ON
AUTOUIC ON
AUTORCC ON
# Ensure .qm files are generated before autogenerating i18n.qrc
AUTOGEN_TARGET_DEPENDS "${WIRESHARK_QT_QM}"
)