summaryrefslogtreecommitdiff
path: root/examples/websockets/qmlwebsocketclient/CMakeLists.txt
diff options
context:
space:
mode:
authorMaurice Kalinowski <maurice.kalinowski@qt.io>2019-09-16 14:22:07 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2019-09-16 14:47:09 +0000
commita3c87a0e44bb67cc3f726dd915178f9f307480e8 (patch)
tree6b40f1f687dd6e25d71e41c37eed2b230524e83f /examples/websockets/qmlwebsocketclient/CMakeLists.txt
parenta5b0495ac273bcc841298b52dae3ca9bb608edf7 (diff)
downloadqtwebsockets-a3c87a0e44bb67cc3f726dd915178f9f307480e8.tar.gz
Add initial-support for cmake
Task-number: QTBUG-78180 Change-Id: If6cf82c61d605332402feffca9bde2ea0dd6e313 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'examples/websockets/qmlwebsocketclient/CMakeLists.txt')
-rw-r--r--examples/websockets/qmlwebsocketclient/CMakeLists.txt46
1 files changed, 46 insertions, 0 deletions
diff --git a/examples/websockets/qmlwebsocketclient/CMakeLists.txt b/examples/websockets/qmlwebsocketclient/CMakeLists.txt
new file mode 100644
index 0000000..bad5143
--- /dev/null
+++ b/examples/websockets/qmlwebsocketclient/CMakeLists.txt
@@ -0,0 +1,46 @@
+# Generated from qmlwebsocketclient.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(qmlwebsocketclient LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Quick)
+find_package(Qt6 COMPONENTS WebSockets)
+
+add_qt_gui_executable(qmlwebsocketclient
+ main.cpp
+)
+target_link_libraries(qmlwebsocketclient PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Quick
+ Qt::WebSockets
+)
+
+# Resources:
+set(data_resource_files
+ "qml/qmlwebsocketclient/main.qml"
+)
+
+QT6_ADD_RESOURCES(qmlwebsocketclient "data"
+ PREFIX
+ "/"
+ FILES
+ ${data_resource_files}
+)
+
+
+install(TARGETS qmlwebsocketclient
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)