CMake: Set Qt autogen properties for Wireshark.

It looks like multi-configuration generators (notably MSBuild) need
Qt autogen properties set on the wireshark target as well as qtui. Do
so unconditionally in both cases. (We were doing so conditionally for
qtui before.)
This commit is contained in:
Gerald Combs 2021-05-13 17:53:40 -07:00 committed by Wireshark GitLab Utility
parent 9a400118df
commit 2c62e2eb3f
2 changed files with 6 additions and 8 deletions

View File

@ -2441,6 +2441,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(MSVC)
set_target_properties(wireshark PROPERTIES LINK_FLAGS_DEBUG "${WS_MSVC_DEBUG_LINK_FLAGS}")

View File

@ -730,17 +730,12 @@ target_compile_definitions(qtui
set_target_properties(qtui PROPERTIES
LINK_FLAGS "${WS_LINK_FLAGS}"
FOLDER "UI"
# Ensure .qm files are generated before autogenerating i18n.qrc
AUTOGEN_TARGET_DEPENDS "${WIRESHARK_QT_QM}"
)
if (NOT CMAKE_AUTOMOC) # Set in the top-level CMakeLists.txt if we're using CMake 3.20.0 or .1
set_target_properties(qtui PROPERTIES
AUTOMOC ON
AUTOUIC ON
AUTORCC ON
)
endif()
# Ensure .qm files are generated before autogenerating i18n.qrc
AUTOGEN_TARGET_DEPENDS "${WIRESHARK_QT_QM}"
)
if(MSVC)
set_target_properties(qtui PROPERTIES LINK_FLAGS_DEBUG "${WS_MSVC_DEBUG_LINK_FLAGS}")