<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <!-- cmake-macros.qdoc --> <title>qt5_generate_repc | Qt Remote Objects 5.15.0</title> <link rel="stylesheet" type="text/css" href="style/offline-simple.css" /> <script type="text/javascript"> document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css"); // loading style sheet breaks anchors that were jumped to before // so force jumping to anchor again setTimeout(function() { var anchor = location.hash; // need to jump to different anchor first (e.g. none) location.hash = "#"; setTimeout(function() { location.hash = anchor; }, 0); }, 0); </script> </head> <body> <div class="header" id="qtdocheader"> <div class="main"> <div class="main-rounded"> <div class="navigationbar"> <ul> <li><a href="../qtdoc/index.html">Qt 5.15</a></li> <li><a href="qtremoteobjects-index.html">Qt Remote Objects</a></li> <li>qt5_generate_repc</li> <li id="buildversion"><a href="qtremoteobjects-index.html">Qt 5.15.0 Reference Documentation</a></li> </ul> </div> </div> <div class="content"> <div class="line"> <div class="content mainContent"> <div class="sidebar"> <div class="toc"> <h3><a name="toc">Contents</a></h3> <ul> <li class="level1"><a href="#synopsis">Synopsis</a></li> <li class="level1"><a href="#description">Description</a></li> <li class="level1"><a href="#examples">Examples</a></li> </ul> </div> <div class="sidebar-content" id="sidebar-content"></div></div> <h1 class="title">qt5_generate_repc</h1> <span class="subtitle"></span> <!-- $$$qtremoteobjects-cmake-qt5-generate-repc.html-description --> <div class="descr"> <a name="details"></a> <a name="synopsis"></a> <h2 id="synopsis">Synopsis</h2> <pre class="cpp plain"> qt5_generate_repc(<VAR> rep_file output_type) </pre> <a name="description"></a> <h2 id="description">Description</h2> <p>Creates rules for calling <a href="qtremoteobjects-repc.html">repc</a> on <code>rep_file</code>. <code>output_type</code> must be either <code>SOURCE</code> or <code>REPLICA</code>. The paths of the generated files are added to <code><VAR></code>.</p> <p>Depending on the <code>output_type</code> argument, the generated code will either implement a <a href="qtremoteobjects-source.html">Qt Remote Objects Source</a> or a <a href="qtremoteobjects-replica.html">Qt Remote Objects Replica</a> type in C++.</p> <a name="examples"></a> <h2 id="examples">Examples</h2> <pre class="cpp"> 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) </pre> </div> <!-- @@@qtremoteobjects-cmake-qt5-generate-repc.html --> </div> </div> </div> </div> </div> <div class="footer"> <p> <acronym title="Copyright">©</acronym> 2020 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners.<br/> The documentation provided herein is licensed under the terms of the <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation License version 1.3</a> as published by the Free Software Foundation.<br/> Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners. </p> </div> </body> </html>