WebUI: Use Map instead of Mootools Hash in Torrents table
[qBittorrent.git] / src / gui / CMakeLists.txt
blob9db94e77e37ab3525e72e985cb02b0dd52676397
1 find_package(Qt6 ${minQt6Version} REQUIRED COMPONENTS Widgets Svg)
3 # CMAKE_AUTO_UI causes unnecessary rebuilds
4 qt_wrap_ui(UI_HEADERS
5     aboutdialog.ui
6     addnewtorrentdialog.ui
7     addtorrentparamswidget.ui
8     autoexpandabledialog.ui
9     banlistoptionsdialog.ui
10     cookiesdialog.ui
11     deletionconfirmationdialog.ui
12     downloadfromurldialog.ui
13     executionlogwidget.ui
14     ipsubnetwhitelistoptionsdialog.ui
15     mainwindow.ui
16     optionsdialog.ui
17     previewselectdialog.ui
18     properties/peersadditiondialog.ui
19     properties/propertieswidget.ui
20     rss/automatedrssdownloader.ui
21     rss/rsswidget.ui
22     search/pluginselectdialog.ui
23     search/pluginsourcedialog.ui
24     search/searchjobwidget.ui
25     search/searchwidget.ui
26     shutdownconfirmdialog.ui
27     speedlimitdialog.ui
28     statsdialog.ui
29     torrentcategorydialog.ui
30     torrentcreatordialog.ui
31     torrentoptionsdialog.ui
32     torrentsharelimitswidget.ui
33     torrenttagsdialog.ui
34     trackerentriesdialog.ui
35     trackersadditiondialog.ui
36     uithemedialog.ui
37     watchedfolderoptionsdialog.ui
40 add_library(qbt_gui STATIC
41     # headers
42     aboutdialog.h
43     addnewtorrentdialog.h
44     addtorrentparamswidget.h
45     advancedsettings.h
46     autoexpandabledialog.h
47     banlistoptionsdialog.h
48     color.h
49     cookiesdialog.h
50     cookiesmodel.h
51     deletionconfirmationdialog.h
52     desktopintegration.h
53     downloadfromurldialog.h
54     executionlogwidget.h
55     filterpatternformat.h
56     filterpatternformatmenu.h
57     flowlayout.h
58     fspathedit.h
59     fspathedit_p.h
60     guiaddtorrentmanager.h
61     guiapplicationcomponent.h
62     hidabletabwidget.h
63     interfaces/iguiapplication.h
64     ipsubnetwhitelistoptionsdialog.h
65     lineedit.h
66     log/logfiltermodel.h
67     log/loglistview.h
68     log/logmodel.h
69     mainwindow.h
70     optionsdialog.h
71     powermanagement/powermanagement.h
72     previewlistdelegate.h
73     previewselectdialog.h
74     progressbarpainter.h
75     properties/downloadedpiecesbar.h
76     properties/peerlistsortmodel.h
77     properties/peerlistwidget.h
78     properties/peersadditiondialog.h
79     properties/pieceavailabilitybar.h
80     properties/piecesbar.h
81     properties/propertieswidget.h
82     properties/proptabbar.h
83     properties/speedplotview.h
84     properties/speedwidget.h
85     raisedmessagebox.h
86     rss/articlelistwidget.h
87     rss/automatedrssdownloader.h
88     rss/feedlistwidget.h
89     rss/htmlbrowser.h
90     rss/rsswidget.h
91     search/pluginselectdialog.h
92     search/pluginsourcedialog.h
93     search/searchjobwidget.h
94     search/searchsortmodel.h
95     search/searchwidget.h
96     shutdownconfirmdialog.h
97     speedlimitdialog.h
98     statsdialog.h
99     statusbar.h
100     torrentcategorydialog.h
101     torrentcontentfiltermodel.h
102     torrentcontentitemdelegate.h
103     torrentcontentmodel.h
104     torrentcontentmodelfile.h
105     torrentcontentmodelfolder.h
106     torrentcontentmodelitem.h
107     torrentcontentwidget.h
108     torrentcreatordialog.h
109     torrentoptionsdialog.h
110     torrentsharelimitswidget.h
111     torrenttagsdialog.h
112     trackerentriesdialog.h
113     trackerlist/trackerlistitemdelegate.h
114     trackerlist/trackerlistmodel.h
115     trackerlist/trackerlistsortmodel.h
116     trackerlist/trackerlistwidget.h
117     trackersadditiondialog.h
118     transferlistdelegate.h
119     transferlistfilters/basefilterwidget.h
120     transferlistfilters/categoryfiltermodel.h
121     transferlistfilters/categoryfilterproxymodel.h
122     transferlistfilters/categoryfilterwidget.h
123     transferlistfilters/statusfilterwidget.h
124     transferlistfilters/tagfiltermodel.h
125     transferlistfilters/tagfilterproxymodel.h
126     transferlistfilters/tagfilterwidget.h
127     transferlistfilters/trackersfilterwidget.h
128     transferlistfilterswidget.h
129     transferlistmodel.h
130     transferlistsortmodel.h
131     transferlistwidget.h
132     tristateaction.h
133     tristatewidget.h
134     uithemecommon.h
135     uithemedialog.h
136     uithememanager.h
137     uithemesource.h
138     utils.h
139     watchedfolderoptionsdialog.h
140     watchedfoldersmodel.h
141     windowstate.h
143     # sources
144     aboutdialog.cpp
145     addnewtorrentdialog.cpp
146     addtorrentparamswidget.cpp
147     advancedsettings.cpp
148     autoexpandabledialog.cpp
149     banlistoptionsdialog.cpp
150     cookiesdialog.cpp
151     cookiesmodel.cpp
152     deletionconfirmationdialog.cpp
153     desktopintegration.cpp
154     downloadfromurldialog.cpp
155     executionlogwidget.cpp
156     filterpatternformatmenu.cpp
157     flowlayout.cpp
158     fspathedit.cpp
159     fspathedit_p.cpp
160     guiaddtorrentmanager.cpp
161     hidabletabwidget.cpp
162     ipsubnetwhitelistoptionsdialog.cpp
163     lineedit.cpp
164     log/logfiltermodel.cpp
165     log/loglistview.cpp
166     log/logmodel.cpp
167     mainwindow.cpp
168     optionsdialog.cpp
169     powermanagement/powermanagement.cpp
170     previewlistdelegate.cpp
171     previewselectdialog.cpp
172     progressbarpainter.cpp
173     properties/downloadedpiecesbar.cpp
174     properties/peerlistsortmodel.cpp
175     properties/peerlistwidget.cpp
176     properties/peersadditiondialog.cpp
177     properties/pieceavailabilitybar.cpp
178     properties/piecesbar.cpp
179     properties/propertieswidget.cpp
180     properties/proptabbar.cpp
181     properties/speedplotview.cpp
182     properties/speedwidget.cpp
183     raisedmessagebox.cpp
184     rss/articlelistwidget.cpp
185     rss/automatedrssdownloader.cpp
186     rss/feedlistwidget.cpp
187     rss/htmlbrowser.cpp
188     rss/rsswidget.cpp
189     search/pluginselectdialog.cpp
190     search/pluginsourcedialog.cpp
191     search/searchjobwidget.cpp
192     search/searchsortmodel.cpp
193     search/searchwidget.cpp
194     shutdownconfirmdialog.cpp
195     speedlimitdialog.cpp
196     statsdialog.cpp
197     statusbar.cpp
198     torrentcategorydialog.cpp
199     torrentcontentfiltermodel.cpp
200     torrentcontentitemdelegate.cpp
201     torrentcontentmodel.cpp
202     torrentcontentmodelfile.cpp
203     torrentcontentmodelfolder.cpp
204     torrentcontentmodelitem.cpp
205     torrentcontentwidget.cpp
206     torrentcreatordialog.cpp
207     torrentoptionsdialog.cpp
208     torrentsharelimitswidget.cpp
209     torrenttagsdialog.cpp
210     trackerentriesdialog.cpp
211     trackerlist/trackerlistitemdelegate.cpp
212     trackerlist/trackerlistmodel.cpp
213     trackerlist/trackerlistsortmodel.cpp
214     trackerlist/trackerlistwidget.cpp
215     trackersadditiondialog.cpp
216     transferlistdelegate.cpp
217     transferlistfilters/basefilterwidget.cpp
218     transferlistfilters/categoryfiltermodel.cpp
219     transferlistfilters/categoryfilterproxymodel.cpp
220     transferlistfilters/categoryfilterwidget.cpp
221     transferlistfilters/statusfilterwidget.cpp
222     transferlistfilters/tagfiltermodel.cpp
223     transferlistfilters/tagfilterproxymodel.cpp
224     transferlistfilters/tagfilterwidget.cpp
225     transferlistfilters/trackersfilterwidget.cpp
226     transferlistfilterswidget.cpp
227     transferlistmodel.cpp
228     transferlistsortmodel.cpp
229     transferlistwidget.cpp
230     tristateaction.cpp
231     tristatewidget.cpp
232     uithemedialog.cpp
233     uithememanager.cpp
234     uithemesource.cpp
235     utils.cpp
236     watchedfolderoptionsdialog.cpp
237     watchedfoldersmodel.cpp
239     # generated .ui headers
240     ${UI_HEADERS}
243 target_sources(qbt_gui INTERFACE about.qrc)
245 # UI headers will be generated in ${CMAKE_CURRENT_BINARY_DIR}
246 target_include_directories(qbt_gui PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
248 target_link_libraries(qbt_gui
249     PRIVATE
250         qbt_base
251     PUBLIC
252         Qt::Gui Qt::Widgets
255 if (DBUS)
256     target_sources(qbt_gui PRIVATE
257         notifications/dbusnotifier.h
258         notifications/dbusnotifier.cpp
259         notifications/dbusnotificationsinterface.h
260         notifications/dbusnotificationsinterface.cpp
261         powermanagement/powermanagement_x11.h
262         powermanagement/powermanagement_x11.cpp
263     )
264 endif()
266 if (STACKTRACE)
267     qt_wrap_ui(STACKTRACE_UI_HEADERS stacktracedialog.ui)
269     target_sources(qbt_gui PRIVATE
270         stacktracedialog.h
271         stacktracedialog.cpp
272         ${STACKTRACE_UI_HEADERS}
273     )
274 endif()
276 if ((CMAKE_SYSTEM_NAME STREQUAL "Windows") OR (CMAKE_SYSTEM_NAME STREQUAL "Darwin"))
277     target_sources(qbt_gui PRIVATE
278         programupdater.h
279         programupdater.cpp
280     )
281 endif()
283 if (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
284     target_sources(qbt_gui PRIVATE
285         macosdockbadge/badger.h
286         macosdockbadge/badger.mm
287         macosdockbadge/badgeview.h
288         macosdockbadge/badgeview.mm
289         macutilities.h
290         macutilities.mm
291     )
292     target_link_libraries(qbt_gui PRIVATE objc)
293 endif()