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