summaryrefslogtreecommitdiffstats
path: root/src/remoteobjects/doc/snippets/cmake-macros/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/remoteobjects/doc/snippets/cmake-macros/CMakeLists.txt')
-rw-r--r--src/remoteobjects/doc/snippets/cmake-macros/CMakeLists.txt26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/remoteobjects/doc/snippets/cmake-macros/CMakeLists.txt b/src/remoteobjects/doc/snippets/cmake-macros/CMakeLists.txt
new file mode 100644
index 0000000..42a5e28
--- /dev/null
+++ b/src/remoteobjects/doc/snippets/cmake-macros/CMakeLists.txt
@@ -0,0 +1,26 @@
+cmake_minimum_required(VERSION 3.1.0)
+
+project(directconnectserver)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+if(CMAKE_VERSION VERSION_LESS "3.7.0")
+ set(CMAKE_INCLUDE_CURRENT_DIR ON)
+endif()
+
+
+#! [qt5_generate_repc]
+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)
+#! [qt5_generate_repc]