qt5_generate_repc

概要

qt5_generate_repc(<VAR> rep_file output_type)
					
					

描述

Creates rules for calling repc on rep_file . output_type must be either SOURCE or REPLICA . The paths of the generated files are added to <VAR> .

Depending on the output_type argument, the generated code will either implement a Qt Remote Objects 源 Qt Remote Objects 复本 type in C++.

范例

find_package(Qt5 COMPONENTS RemoteObjects REQUIRED)
set(SOURCES
    main.cpp
    simpleswitch.cpp
)
qt5_generate_repc(SOURCES simpleswitch.rep SOURCE)
add_executable(directconnectserver ${SOURCES})
target_link_libraries(directconnectserver Qt5::RemoteObjects)