| 1 |
# Copyright (C) 2022 The Qt Company Ltd. |
| 2 |
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause |
| 3 |
|
| 4 |
set(CMAKE_INCLUDE_CURRENT_DIR ON) |
| 5 |
|
| 6 |
set(car_SRCS) |
| 7 |
qt_add_dbus_adaptor(car_SRCS |
| 8 |
../common/car.xml |
| 9 |
qobject.h |
| 10 |
"" # empty parent_class value on purpose to not pass -l flag |
| 11 |
car_adaptor |
| 12 |
) |
| 13 |
|
| 14 |
qt_add_executable(car |
| 15 |
car.cpp car.h |
| 16 |
main.cpp |
| 17 |
${car_SRCS} |
| 18 |
) |
| 19 |
|
| 20 |
set_target_properties(car PROPERTIES |
| 21 |
WIN32_EXECUTABLE TRUE |
| 22 |
MACOSX_BUNDLE TRUE |
| 23 |
) |
| 24 |
|
| 25 |
target_link_libraries(car PRIVATE |
| 26 |
Qt6::Core |
| 27 |
Qt6::DBus |
| 28 |
Qt6::Gui |
| 29 |
Qt6::Widgets |
| 30 |
) |
| 31 |
|
| 32 |
install(TARGETS car |
| 33 |
BUNDLE DESTINATION . |
| 34 |
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} |
| 35 |
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} |
| 36 |
) |
| 37 |
|
| 38 |
qt_generate_deploy_app_script( |
| 39 |
TARGET car |
| 40 |
OUTPUT_SCRIPT deploy_script |
| 41 |
NO_UNSUPPORTED_PLATFORM_ERROR |
| 42 |
) |
| 43 |
install(SCRIPT ${deploy_script}) |