CMake: Add qt_autogen_tools_initial_setup calls

Add calls to qt_autogen_tools_initial_setup to avoid
'CMake Error: AUTOMOC for target' errors.

Pick-to: 6.8
Fixes: QTBUG-129918
Change-Id: I4d120707b738edfdf37f89228434145b4b1ad75f
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
Alexandru Croitor 2024-10-11 10:14:57 +02:00
parent 746aae76b7
commit 383535496b
2 changed files with 2 additions and 0 deletions

View File

@ -31,6 +31,7 @@ qt_add_protobuf(tst_qtgrpcgen_protobuf_common
PROTO_FILES
data/qtgrpcgen.proto
)
qt_autogen_tools_initial_setup(tst_qtgrpcgen_protobuf_common)
set(cmake_generator_tests "")
qt_add_grpc(tst_qtgrpcgen_generate_package_subfolders CLIENT

View File

@ -3,6 +3,7 @@
set(CMAKE_AUTOMOC TRUE)
qt_add_library(protocplugintestcommon STATIC protocplugintestcommon.h protocplugintestcommon.cpp)
qt_autogen_tools_initial_setup(protocplugintestcommon)
target_include_directories(protocplugintestcommon PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}>")