aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quickcontrols/imagine/automotive/CMakeLists.txt
blob: 161d4b92b69715cb644c9a6aaeba83f2a15d4a62 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause

cmake_minimum_required(VERSION 3.16)
project(automotive LANGUAGES CXX)

set(CMAKE_AUTOMOC ON)

find_package(Qt6 REQUIRED COMPONENTS Core Gui Quick QuickControls2)

qt_add_executable(automotiveexample WIN32 MACOSX_BUNDLE
    automotive.cpp
)

qt_add_qml_module(automotiveexample
    URI automotive
    NO_RESOURCE_TARGET_PATH
    QML_FILES
        "qml/FeatureButton.qml"
        "qml/LargeLabel.qml"
        "qml/automotive.qml"

    RESOURCES
        "icons/automotive/44x44/air-con.png"
        "icons/automotive/44x44/command.png"
        "icons/automotive/44x44/message.png"
        "icons/automotive/44x44/music.png"
        "icons/automotive/44x44/seats.png"
        "icons/automotive/44x44/settings.png"
        "icons/automotive/44x44/statistics.png"
        "icons/automotive/44x44/windows.png"
        "icons/automotive/44x44@2/air-con.png"
        "icons/automotive/44x44@2/command.png"
        "icons/automotive/44x44@2/message.png"
        "icons/automotive/44x44@2/music.png"
        "icons/automotive/44x44@2/navigation.png"
        "icons/automotive/44x44@2/seats.png"
        "icons/automotive/44x44@2/settings.png"
        "icons/automotive/44x44@2/statistics.png"
        "icons/automotive/44x44@2/windows.png"
        "icons/automotive/icons.svg"
        "icons/automotive/index.theme"
        "icons/car.png"
        "icons/car@2x.png"
        "icons/warning.png"
        "icons/warning@2x.png"
        "icons/weather.png"
        "icons/weather@2x.png"
        "imagine-assets/applicationwindow-background.png"
        "imagine-assets/applicationwindow-background@2x.png"
        "imagine-assets/button-background-checked-hovered.9.png"
        "imagine-assets/button-background-checked-hovered@2x.9.png"
        "imagine-assets/button-background-checked.9.png"
        "imagine-assets/button-background-checked@2x.9.png"
        "imagine-assets/button-background-hovered.9.png"
        "imagine-assets/button-background-hovered@2x.9.png"
        "imagine-assets/button-background-pressed.9.png"
        "imagine-assets/button-background-pressed@2x.9.png"
        "imagine-assets/button-background.9.png"
        "imagine-assets/button-background@2x.9.png"
        "imagine-assets/dial-background-hovered.png"
        "imagine-assets/dial-background-hovered@2x.png"
        "imagine-assets/dial-background-pressed.png"
        "imagine-assets/dial-background-pressed@2x.png"
        "imagine-assets/dial-background.png"
        "imagine-assets/dial-background@2x.png"
        "imagine-assets/dial-handle-pressed.png"
        "imagine-assets/dial-handle-pressed@2x.png"
        "imagine-assets/dial-handle.png"
        "imagine-assets/dial-handle@2x.png"
        "imagine-assets/frame-background.9.png"
        "imagine-assets/frame-background@2x.9.png"
        "imagine-assets/itemdelegate-background-checked.9.png"
        "imagine-assets/itemdelegate-background-checked@2x.9.png"
        "imagine-assets/itemdelegate-background-hovered.9.png"
        "imagine-assets/itemdelegate-background-hovered@2x.9.png"
        "imagine-assets/itemdelegate-background-pressed.9.png"
        "imagine-assets/itemdelegate-background-pressed@2x.9.png"
        "imagine-assets/itemdelegate-background.9.png"
        "imagine-assets/itemdelegate-background@2x.9.png"
        "imagine-assets/radiobutton-indicator-checked-hovered.png"
        "imagine-assets/radiobutton-indicator-checked-hovered@2x.png"
        "imagine-assets/radiobutton-indicator-checked-pressed.png"
        "imagine-assets/radiobutton-indicator-checked-pressed@2x.png"
        "imagine-assets/radiobutton-indicator-checked.png"
        "imagine-assets/radiobutton-indicator-checked@2x.png"
        "imagine-assets/radiobutton-indicator-hovered.png"
        "imagine-assets/radiobutton-indicator-hovered@2x.png"
        "imagine-assets/radiobutton-indicator-pressed.png"
        "imagine-assets/radiobutton-indicator-pressed@2x.png"
        "imagine-assets/radiobutton-indicator.png"
        "imagine-assets/radiobutton-indicator@2x.png"
        "imagine-assets/scrollindicator-handle.png"
        "imagine-assets/scrollindicator-handle@2x.png"
        "imagine-assets/slider-background-horizontal.9.png"
        "imagine-assets/slider-background-horizontal@2x.9.png"
        "imagine-assets/slider-handle-hovered.png"
        "imagine-assets/slider-handle-hovered@2x.png"
        "imagine-assets/slider-handle-pressed.png"
        "imagine-assets/slider-handle-pressed@2x.png"
        "imagine-assets/slider-handle.png"
        "imagine-assets/slider-handle@2x.png"
        "imagine-assets/slider-progress-horizontal-pressed.9.png"
        "imagine-assets/slider-progress-horizontal-pressed@2x.9.png"
        "imagine-assets/slider-progress-horizontal.9.png"
        "imagine-assets/slider-progress-horizontal@2x.9.png"
        "imagine-assets/switchdelegate-background.9.png"
        "imagine-assets/switchdelegate-background@2x.9.png"
        "imagine-assets/switchdelegate-handle-checked-hovered.png"
        "imagine-assets/switchdelegate-handle-checked-hovered@2x.png"
        "imagine-assets/switchdelegate-handle-checked.png"
        "imagine-assets/switchdelegate-handle-checked@2x.png"
        "imagine-assets/switchdelegate-handle-hovered.png"
        "imagine-assets/switchdelegate-handle-hovered@2x.png"
        "imagine-assets/switchdelegate-handle-pressed.png"
        "imagine-assets/switchdelegate-handle-pressed@2x.png"
        "imagine-assets/switchdelegate-handle.png"
        "imagine-assets/switchdelegate-handle@2x.png"
        "imagine-assets/switchdelegate-indicator-pressed.png"
        "imagine-assets/switchdelegate-indicator-pressed@2x.png"
        "imagine-assets/switchdelegate-indicator.png"
        "imagine-assets/switchdelegate-indicator@2x.png"
        "imagine-assets/toolseparator-separator-vertical.9.png"
        "imagine-assets/toolseparator-separator-vertical@2x.9.png"
        "qtquickcontrols2.conf"
)

target_link_libraries(automotiveexample PUBLIC
    Qt6::Core
    Qt6::Gui
    Qt6::Quick
    Qt6::QuickControls2
)

install(TARGETS automotiveexample
    BUNDLE  DESTINATION .
    RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
    LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
)

qt_generate_deploy_qml_app_script(
    TARGET automotiveexample
    OUTPUT_SCRIPT deploy_script
    MACOS_BUNDLE_POST_BUILD
    NO_UNSUPPORTED_PLATFORM_ERROR
    DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
)
install(SCRIPT ${deploy_script})