qt_internal_add_test(tst_grpc_client_qml
    GUI
    QMLTEST
    SOURCES
        grpcclientqmltest.cpp
        serverlauncher.h serverlauncher.cpp
    PUBLIC_LIBRARIES
        Qt::Gui
        Qt::Qml
        Qt::Grpc
        Qt::Protobuf
    TESTDATA
        qml/tst_grpcclient.qml
    DEFINES
        QT_GRPC_SERVER_EXECUTABLE=\"$<TARGET_FILE:echoserver>\"
)

_qt_internal_link_protobuf_objects(tst_grpc_client_qml tst_grpc_tests_common_gen)

# TODO Qt6: Restore or remove the code related to the reference gRPC implementation
# if(QT_PROTOBUF_NATIVE_GRPC_CHANNEL)
#     include("${CMAKE_CURRENT_LIST_DIR}/native_grpc_channel_tests.cmake")
# endif()
