summaryrefslogtreecommitdiffstats
path: root/examples/network/multistreamclient
diff options
context:
space:
mode:
Diffstat (limited to 'examples/network/multistreamclient')
-rw-r--r--examples/network/multistreamclient/CMakeLists.txt46
1 files changed, 29 insertions, 17 deletions
diff --git a/examples/network/multistreamclient/CMakeLists.txt b/examples/network/multistreamclient/CMakeLists.txt
index b9f10f3fd5..399333fd29 100644
--- a/examples/network/multistreamclient/CMakeLists.txt
+++ b/examples/network/multistreamclient/CMakeLists.txt
@@ -1,21 +1,33 @@
# Generated from multistreamclient.pro.
-#####################################################################
-## multistreamclient Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(multistreamclient LANGUAGES CXX)
-add_qt_executable(multistreamclient
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/network/multistreamclient"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/network/multistreamclient"
- SOURCES
- chatconsumer.cpp chatconsumer.h
- client.cpp client.h
- consumer.h
- main.cpp
- movieconsumer.cpp movieconsumer.h
- timeconsumer.cpp timeconsumer.h
- LIBRARIES
- Qt::Network
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Network)
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(multistreamclient WIN32 MACOSX_BUNDLE
+ chatconsumer.cpp chatconsumer.h
+ client.cpp client.h
+ consumer.h
+ main.cpp
+ movieconsumer.cpp movieconsumer.h
+ timeconsumer.cpp timeconsumer.h
+)
+target_link_libraries(multistreamclient PUBLIC
+ Qt::Network
+ Qt::Widgets
+)
+
+install(TARGETS multistreamclient
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)