summaryrefslogtreecommitdiffstats
path: root/examples/widgets/painting/composition/.prev_CMakeLists.txt
blob: a61e5fe2dd44b497768c489d20b4b16decd41c9d (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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
# Generated from composition.pro.

cmake_minimum_required(VERSION 3.14)
project(composition LANGUAGES CXX)

set(CMAKE_INCLUDE_CURRENT_DIR ON)

set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)

if(NOT DEFINED INSTALL_EXAMPLESDIR)
  set(INSTALL_EXAMPLESDIR "examples")
endif()

set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/painting/composition")

find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)

add_qt_gui_executable(composition
    ../shared/arthurstyle.cpp ../shared/arthurstyle.h
    ../shared/arthurwidgets.cpp ../shared/arthurwidgets.h
    ../shared/hoverpoints.cpp ../shared/hoverpoints.h
    composition.cpp composition.h
    main.cpp
)
target_include_directories(composition PUBLIC
    ../shared
)

target_link_libraries(composition PUBLIC
    Qt::Core
    Qt::Gui
    Qt::Widgets
)


# Resources:
set_source_files_properties("../shared/images/button_normal_cap_left.png"
    PROPERTIES QT_RESOURCE_ALIAS "images/button_normal_cap_left.png"
)
set_source_files_properties("../shared/images/button_normal_cap_right.png"
    PROPERTIES QT_RESOURCE_ALIAS "images/button_normal_cap_right.png"
)
set_source_files_properties("../shared/images/button_normal_stretch.png"
    PROPERTIES QT_RESOURCE_ALIAS "images/button_normal_stretch.png"
)
set_source_files_properties("../shared/images/button_pressed_cap_left.png"
    PROPERTIES QT_RESOURCE_ALIAS "images/button_pressed_cap_left.png"
)
set_source_files_properties("../shared/images/button_pressed_cap_right.png"
    PROPERTIES QT_RESOURCE_ALIAS "images/button_pressed_cap_right.png"
)
set_source_files_properties("../shared/images/button_pressed_stretch.png"
    PROPERTIES QT_RESOURCE_ALIAS "images/button_pressed_stretch.png"
)
set_source_files_properties("../shared/images/frame_bottom.png"
    PROPERTIES QT_RESOURCE_ALIAS "images/frame_bottom.png"
)
set_source_files_properties("../shared/images/frame_bottomleft.png"
    PROPERTIES QT_RESOURCE_ALIAS "images/frame_bottomleft.png"
)
set_source_files_properties("../shared/images/frame_bottomright.png"
    PROPERTIES QT_RESOURCE_ALIAS "images/frame_bottomright.png"
)
set_source_files_properties("../shared/images/frame_left.png"
    PROPERTIES QT_RESOURCE_ALIAS "images/frame_left.png"
)
set_source_files_properties("../shared/images/frame_right.png"
    PROPERTIES QT_RESOURCE_ALIAS "images/frame_right.png"
)
set_source_files_properties("../shared/images/frame_top.png"
    PROPERTIES QT_RESOURCE_ALIAS "images/frame_top.png"
)
set_source_files_properties("../shared/images/frame_topleft.png"
    PROPERTIES QT_RESOURCE_ALIAS "images/frame_topleft.png"
)
set_source_files_properties("../shared/images/frame_topright.png"
    PROPERTIES QT_RESOURCE_ALIAS "images/frame_topright.png"
)
set_source_files_properties("../shared/images/groupframe_bottom_left.png"
    PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_bottom_left.png"
)
set_source_files_properties("../shared/images/groupframe_bottom_right.png"
    PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_bottom_right.png"
)
set_source_files_properties("../shared/images/groupframe_bottom_stretch.png"
    PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_bottom_stretch.png"
)
set_source_files_properties("../shared/images/groupframe_left_stretch.png"
    PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_left_stretch.png"
)
set_source_files_properties("../shared/images/groupframe_right_stretch.png"
    PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_right_stretch.png"
)
set_source_files_properties("../shared/images/groupframe_top_stretch.png"
    PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_top_stretch.png"
)
set_source_files_properties("../shared/images/groupframe_topleft.png"
    PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_topleft.png"
)
set_source_files_properties("../shared/images/groupframe_topright.png"
    PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_topright.png"
)
set_source_files_properties("../shared/images/line_dash_dot.png"
    PROPERTIES QT_RESOURCE_ALIAS "images/line_dash_dot.png"
)
set_source_files_properties("../shared/images/line_dash_dot_dot.png"
    PROPERTIES QT_RESOURCE_ALIAS "images/line_dash_dot_dot.png"
)
set_source_files_properties("../shared/images/line_dashed.png"
    PROPERTIES QT_RESOURCE_ALIAS "images/line_dashed.png"
)
set_source_files_properties("../shared/images/line_dotted.png"
    PROPERTIES QT_RESOURCE_ALIAS "images/line_dotted.png"
)
set_source_files_properties("../shared/images/line_solid.png"
    PROPERTIES QT_RESOURCE_ALIAS "images/line_solid.png"
)
set_source_files_properties("../shared/images/radiobutton-on.png"
    PROPERTIES QT_RESOURCE_ALIAS "images/radiobutton-on.png"
)
set_source_files_properties("../shared/images/radiobutton_off.png"
    PROPERTIES QT_RESOURCE_ALIAS "images/radiobutton_off.png"
)
set_source_files_properties("../shared/images/radiobutton_on.png"
    PROPERTIES QT_RESOURCE_ALIAS "images/radiobutton_on.png"
)
set_source_files_properties("../shared/images/slider_bar.png"
    PROPERTIES QT_RESOURCE_ALIAS "images/slider_bar.png"
)
set_source_files_properties("../shared/images/slider_thumb_on.png"
    PROPERTIES QT_RESOURCE_ALIAS "images/slider_thumb_on.png"
)
set_source_files_properties("../shared/images/title_cap_left.png"
    PROPERTIES QT_RESOURCE_ALIAS "images/title_cap_left.png"
)
set_source_files_properties("../shared/images/title_cap_right.png"
    PROPERTIES QT_RESOURCE_ALIAS "images/title_cap_right.png"
)
set_source_files_properties("../shared/images/title_stretch.png"
    PROPERTIES QT_RESOURCE_ALIAS "images/title_stretch.png"
)
set(shared_resource_files
    "images/button_normal_cap_left.png"
    "images/button_normal_cap_right.png"
    "images/button_normal_stretch.png"
    "images/button_pressed_cap_left.png"
    "images/button_pressed_cap_right.png"
    "images/button_pressed_stretch.png"
    "images/frame_bottom.png"
    "images/frame_bottomleft.png"
    "images/frame_bottomright.png"
    "images/frame_left.png"
    "images/frame_right.png"
    "images/frame_top.png"
    "images/frame_topleft.png"
    "images/frame_topright.png"
    "images/groupframe_bottom_left.png"
    "images/groupframe_bottom_right.png"
    "images/groupframe_bottom_stretch.png"
    "images/groupframe_left_stretch.png"
    "images/groupframe_right_stretch.png"
    "images/groupframe_top_stretch.png"
    "images/groupframe_topleft.png"
    "images/groupframe_topright.png"
    "images/line_dash_dot.png"
    "images/line_dash_dot_dot.png"
    "images/line_dashed.png"
    "images/line_dotted.png"
    "images/line_solid.png"
    "images/radiobutton-on.png"
    "images/radiobutton_off.png"
    "images/radiobutton_on.png"
    "images/slider_bar.png"
    "images/slider_thumb_on.png"
    "images/title_cap_left.png"
    "images/title_cap_right.png"
    "images/title_stretch.png"
)

qt6_add_resources(composition "shared"
    PREFIX
        "/res"
    BASE
        "../shared"
    FILES
        ${shared_resource_files}
)
set(composition_resource_files
    "composition.cpp"
    "composition.html"
    "flower.jpg"
    "flower_alpha.jpg"
)

qt6_add_resources(composition "composition"
    PREFIX
        "/res/composition"
    FILES
        ${composition_resource_files}
)

if(QT_FEATURE_opengl)
    target_sources(composition PUBLIC
        ../shared/fbopaintdevice.cpp ../shared/fbopaintdevice.h
    )

    target_link_libraries(composition PUBLIC
        Qt::OpenGL
    )
endif()

install(TARGETS composition
    RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
    BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
    LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)