2022-07-05 13:26:52 +02:00
|
|
|
# Copyright (C) 2022 The Qt Company Ltd.
|
2024-02-28 11:38:51 +01:00
|
|
|
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
2022-07-05 13:26:52 +02:00
|
|
|
|
2021-08-16 18:14:46 +02:00
|
|
|
cmake_minimum_required(VERSION 3.16)
|
2019-06-04 17:08:47 +02:00
|
|
|
project(chat LANGUAGES CXX)
|
2019-03-18 19:26:24 +01:00
|
|
|
|
2019-06-04 17:08:47 +02:00
|
|
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
|
|
|
|
2021-12-02 08:54:27 +01:00
|
|
|
find_package(Qt6 REQUIRED COMPONENTS Core DBus Gui Widgets)
|
2019-06-04 17:08:47 +02:00
|
|
|
|
2022-11-15 22:00:14 +01:00
|
|
|
qt_standard_project_setup()
|
|
|
|
|
2019-06-04 17:08:47 +02:00
|
|
|
set(chat_SRCS)
|
2021-12-08 15:59:33 +01:00
|
|
|
qt_add_dbus_interface(chat_SRCS
|
2019-06-04 17:08:47 +02:00
|
|
|
org.example.chat.xml
|
|
|
|
chat_interface
|
|
|
|
)
|
2021-12-08 17:25:35 +01:00
|
|
|
|
2021-12-08 15:59:33 +01:00
|
|
|
qt_add_dbus_adaptor(chat_SRCS
|
2019-06-04 17:08:47 +02:00
|
|
|
org.example.chat.xml
|
|
|
|
qobject.h
|
|
|
|
QObject
|
|
|
|
chat_adaptor
|
|
|
|
)
|
2021-12-08 16:42:09 +01:00
|
|
|
|
2020-10-16 11:55:24 +02:00
|
|
|
qt_add_executable(chat
|
2019-06-04 17:08:47 +02:00
|
|
|
chat.cpp chat.h
|
|
|
|
chatmainwindow.ui
|
2021-12-08 16:42:09 +01:00
|
|
|
${chat_SRCS}
|
2019-06-04 17:08:47 +02:00
|
|
|
)
|
2021-12-08 17:25:35 +01:00
|
|
|
|
2020-10-26 16:22:32 +01:00
|
|
|
set_target_properties(chat PROPERTIES
|
|
|
|
WIN32_EXECUTABLE TRUE
|
|
|
|
MACOSX_BUNDLE TRUE
|
|
|
|
)
|
2021-12-08 17:25:35 +01:00
|
|
|
|
2022-11-21 12:03:41 +01:00
|
|
|
target_link_libraries(chat PRIVATE
|
2022-11-14 14:49:32 +01:00
|
|
|
Qt6::Core
|
|
|
|
Qt6::DBus
|
|
|
|
Qt6::Gui
|
|
|
|
Qt6::Widgets
|
2019-06-04 17:08:47 +02:00
|
|
|
)
|
2020-02-04 08:15:50 +01:00
|
|
|
|
2019-06-04 17:08:47 +02:00
|
|
|
install(TARGETS chat
|
2024-03-18 13:21:08 +01:00
|
|
|
BUNDLE DESTINATION .
|
|
|
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
|
|
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
|
|
)
|
|
|
|
|
|
|
|
qt_generate_deploy_app_script(
|
|
|
|
TARGET chat
|
|
|
|
OUTPUT_SCRIPT deploy_script
|
|
|
|
NO_UNSUPPORTED_PLATFORM_ERROR
|
2019-03-18 19:26:24 +01:00
|
|
|
)
|
2024-03-18 13:21:08 +01:00
|
|
|
install(SCRIPT ${deploy_script})
|