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