-
Notifications
You must be signed in to change notification settings - Fork 367
/
CMakeLists.txt
458 lines (403 loc) · 14 KB
/
CMakeLists.txt
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
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
project( tomahawklib )
SET( QT_USE_QTGUI TRUE )
SET( QT_USE_QTSQL TRUE )
SET( QT_USE_QTNETWORK TRUE )
SET( QT_USE_QTXML TRUE )
SET( QT_USE_QTUITOOLS TRUE )
include( ${QT_USE_FILE} )
add_definitions( ${QT_DEFINITIONS} )
add_definitions( -DQT_SHARED )
add_definitions( -DDLLEXPORT_PRO )
add_definitions( -DQT_SHAREDPOINTER_TRACK_POINTERS )
set( libGuiSources
ActionCollection.cpp
ContextMenu.cpp
DropJob.cpp
GlobalActionManager.cpp
ViewPage.cpp
ViewManager.cpp
LatchManager.cpp
TomahawkSettingsGui.cpp
context/ContextPage.cpp
context/ContextWidget.cpp
context/pages/TopTracksContext.cpp
context/pages/RelatedArtistsContext.cpp
context/pages/WikipediaContext.cpp
context/pages/WebContext.cpp
jobview/JobStatusView.cpp
jobview/JobStatusModel.cpp
jobview/JobStatusDelegate.cpp
jobview/JobStatusItem.cpp
jobview/AclJobItem.cpp
jobview/PipelineStatusItem.cpp
jobview/TransferStatusItem.cpp
jobview/LatchedStatusItem.cpp
jobview/ErrorStatusMessage.cpp
jobview/IndexingJobItem.cpp
infobar/InfoBar.cpp
playlist/TreeModel.cpp
playlist/TreeProxyModel.cpp
playlist/TreeProxyModelPlaylistInterface.cpp
playlist/TreeHeader.cpp
playlist/TreeItemDelegate.cpp
playlist/CollectionProxyModel.cpp
playlist/CollectionProxyModelPlaylistInterface.cpp
playlist/CollectionFlatModel.cpp
playlist/CollectionView.cpp
playlist/PlaylistModel.cpp
playlist/PlaylistProxyModel.cpp
playlist/PlaylistProxyModelPlaylistInterface.cpp
playlist/PlaylistView.cpp
playlist/PlaylistItemDelegate.cpp
playlist/QueueProxyModel.cpp
playlist/QueueProxyModelPlaylistInterface.cpp
playlist/QueueView.cpp
playlist/TrackModel.cpp
playlist/TrackModelItem.cpp
playlist/TrackProxyModel.cpp
playlist/TrackProxyModelPlaylistInterface.cpp
playlist/TrackView.cpp
playlist/TrackHeader.cpp
playlist/TreeModelItem.cpp
playlist/AlbumItem.cpp
playlist/AlbumModel.cpp
playlist/AlbumProxyModel.cpp
playlist/AlbumProxyModelPlaylistInterface.cpp
playlist/AlbumItemDelegate.cpp
playlist/AlbumView.cpp
playlist/ArtistView.cpp
playlist/CustomPlaylistView.cpp
playlist/ViewHeader.cpp
playlist/RecentlyAddedModel.cpp
playlist/RecentlyPlayedModel.cpp
playlist/PlaylistLargeItemDelegate.cpp
playlist/PlaylistChartItemDelegate.cpp
playlist/dynamic/DynamicPlaylist.cpp
playlist/dynamic/DynamicView.cpp
playlist/dynamic/DynamicModel.cpp
playlist/dynamic/echonest/EchonestGenerator.cpp
playlist/dynamic/echonest/EchonestControl.cpp
playlist/dynamic/echonest/EchonestSteerer.cpp
playlist/dynamic/widgets/DynamicWidget.cpp
playlist/dynamic/widgets/DynamicControlWrapper.cpp
playlist/dynamic/widgets/DynamicControlList.cpp
playlist/dynamic/widgets/ReadOrWriteWidget.cpp
playlist/dynamic/widgets/MiscControlWidgets.cpp
playlist/dynamic/widgets/CollapsibleControls.cpp
playlist/dynamic/widgets/DynamicSetupWidget.cpp
playlist/dynamic/widgets/LoadingSpinner.cpp
playlist/topbar/TopBar.cpp
playlist/topbar/ClearButton.cpp
playlist/topbar/SearchLineEdit.cpp
playlist/topbar/LineEdit.cpp
playlist/topbar/SearchButton.cpp
ExternalResolverGui.cpp
resolvers/ScriptResolver.cpp
resolvers/QtScriptResolver.cpp
utils/widgetdragfilter.cpp
utils/xspfgenerator.cpp
utils/JspfLoader.cpp
utils/SpotifyParser.cpp
utils/M3uLoader.cpp
utils/ItunesParser.cpp
utils/RdioParser.cpp
utils/ShortenedLinkParser.cpp
utils/StyleHelper.cpp
utils/DropJobNotifier.cpp
utils/ProxyStyle.cpp
utils/tomahawkutilsgui.cpp
utils/Closure.cpp
utils/PixmapDelegateFader.cpp
utils/SmartPointerList.h
widgets/AnimatedCounterLabel.cpp
widgets/CheckDirTree.cpp
widgets/QueryLabel.cpp
widgets/ImageButton.cpp
widgets/AnimatedSplitter.cpp
widgets/ElidedLabel.cpp
widgets/NewPlaylistWidget.cpp
widgets/SearchWidget.cpp
widgets/SeekSlider.cpp
widgets/PlaylistTypeSelectorDialog.cpp
widgets/WelcomeWidget.cpp
widgets/WhatsHotWidget.cpp
widgets/NewReleasesWidget.cpp
widgets/ChartDataLoader.cpp
widgets/RecentlyPlayedPlaylistsModel.cpp
widgets/RecentPlaylistsModel.cpp
widgets/OverlayButton.cpp
widgets/OverlayWidget.cpp
widgets/HeaderLabel.cpp
widgets/HeaderWidget.cpp
widgets/ComboBox.cpp
widgets/ToggleButton.cpp
widgets/FadingPixmap.cpp
widgets/SocialPlaylistWidget.cpp
widgets/infowidgets/SourceInfoWidget.cpp
widgets/infowidgets/ArtistInfoWidget.cpp
widgets/infowidgets/AlbumInfoWidget.cpp
widgets/Breadcrumb.cpp
widgets/BreadcrumbButton.cpp
)
IF(QCA2_FOUND)
set( libGuiSources ${libGuiSources} utils/GroovesharkParser.cpp )
set( libGuiHeaders ${libGuiHeaders} utils/GroovesharkParser.h )
ENDIF(QCA2_FOUND)
set( libSources
TomahawkSettings.cpp
SourceList.cpp
Pipeline.cpp
AclRegistry.cpp
Artist.cpp
ArtistPlaylistInterface.cpp
Album.cpp
AlbumPlaylistInterface.cpp
Collection.cpp
FuncTimeout.cpp
Playlist.cpp
PlaylistPlaylistInterface.cpp
Resolver.cpp
ExternalResolver.cpp
Query.cpp
Result.cpp
Source.cpp
SourcePlaylistInterface.cpp
PlaylistInterface.cpp
EchonestCatalogSynchronizer.cpp
accounts/AccountManager.cpp
accounts/Account.cpp
accounts/AccountModel.cpp
accounts/AccountModelFilterProxy.cpp
accounts/ResolverAccount.cpp
sip/SipPlugin.cpp
sip/SipHandler.cpp
sip/SipInfo.cpp
audio/AudioEngine.cpp
database/Database.cpp
database/FuzzyIndex.cpp
database/DatabaseCollection.cpp
database/LocalCollection.cpp
database/DatabaseWorker.cpp
database/DatabaseImpl.cpp
database/DatabaseResolver.cpp
database/DatabaseCommand.cpp
database/DatabaseCommandLoggable.cpp
database/DatabaseCommand_Resolve.cpp
database/DatabaseCommand_AllArtists.cpp
database/DatabaseCommand_AllAlbums.cpp
database/DatabaseCommand_AllTracks.cpp
database/DatabaseCommand_AddFiles.cpp
database/DatabaseCommand_DeleteFiles.cpp
database/DatabaseCommand_DirMtimes.cpp
database/DatabaseCommand_FileMTimes.cpp
database/DatabaseCommand_LoadFiles.cpp
database/DatabaseCommand_LogPlayback.cpp
database/DatabaseCommand_AddSource.cpp
database/DatabaseCommand_SourceOffline.cpp
database/DatabaseCommand_CollectionStats.cpp
database/DatabaseCommand_LoadPlaylistEntries.cpp
database/DatabaseCommand_ModifyPlaylist.cpp
database/DatabaseCommand_PlaybackHistory.cpp
database/DatabaseCommand_SetPlaylistRevision.cpp
database/DatabaseCommand_LoadAllPlaylists.cpp
database/DatabaseCommand_LoadAllSortedPlaylists.cpp
database/DatabaseCommand_LoadAllSources.cpp
database/DatabaseCommand_CreatePlaylist.cpp
database/DatabaseCommand_DeletePlaylist.cpp
database/DatabaseCommand_RenamePlaylist.cpp
database/DatabaseCommand_LoadOps.cpp
database/DatabaseCommand_UpdateSearchIndex.cpp
database/DatabaseCommand_SetDynamicPlaylistRevision.cpp
database/DatabaseCommand_CreateDynamicPlaylist.cpp
database/DatabaseCommand_LoadDynamicPlaylist.cpp
database/DatabaseCommand_LoadDynamicPlaylistEntries.cpp
database/DatabaseCommand_LoadAllAutoPlaylists.cpp
database/DatabaseCommand_LoadAllStations.cpp
database/DatabaseCommand_DeleteDynamicPlaylist.cpp
database/DatabaseCommand_AddClientAuth.cpp
database/DatabaseCommand_ClientAuthValid.cpp
database/DatabaseCommand_SocialAction.cpp
database/DatabaseCommand_LoadSocialActions.cpp
database/DatabaseCommand_GenericSelect.cpp
database/DatabaseCommand_SetCollectionAttributes.cpp
database/DatabaseCommand_CollectionAttributes.cpp
database/DatabaseCommand_TrackAttributes.cpp
database/DatabaseCommand_SetTrackAttributes.cpp
database/Database.cpp
infosystem/InfoSystem.cpp
infosystem/InfoSystemCache.cpp
infosystem/InfoSystemWorker.cpp
infosystem/infoplugins/generic/EchonestPlugin.cpp
infosystem/infoplugins/generic/ChartsPlugin.cpp
infosystem/infoplugins/generic/NewReleasesPlugin.cpp
infosystem/infoplugins/generic/spotifyPlugin.cpp
infosystem/infoplugins/generic/hypemPlugin.cpp
infosystem/infoplugins/generic/MusixMatchPlugin.cpp
infosystem/infoplugins/generic/musicbrainzPlugin.cpp
infosystem/infoplugins/generic/RoviPlugin.cpp
network/BufferIoDevice.cpp
network/MsgProcessor.cpp
network/StreamConnection.cpp
network/DbSyncConnection.cpp
network/RemoteCollection.cpp
network/PortFwdThread.cpp
network/Servent.cpp
network/Connection.cpp
network/ControlConnection.cpp
playlist/PlaylistUpdaterInterface.cpp
playlist/dynamic/DynamicPlaylist.cpp
playlist/dynamic/GeneratorFactory.cpp
playlist/dynamic/GeneratorInterface.cpp
playlist/dynamic/DynamicPlaylistRevision.cpp
playlist/XspfUpdater.cpp
playlist/dynamic/database/DatabaseGenerator.cpp
playlist/dynamic/database/DatabaseControl.cpp
playlist/dynamic/DynamicControl.cpp
taghandlers/tag.cpp
taghandlers/apetag.cpp
taghandlers/asftag.cpp
taghandlers/id3v1tag.cpp
taghandlers/id3v2tag.cpp
taghandlers/mp4tag.cpp
taghandlers/oggtag.cpp
utils/tomahawkutils.cpp
utils/Logger.cpp
utils/Qnr_IoDeviceStream.cpp
utils/xspfloader.cpp
utils/tomahawkcache.cpp
thirdparty/kdsingleapplicationguard/kdsingleapplicationguard.cpp
thirdparty/kdsingleapplicationguard/kdsharedmemorylocker.cpp
thirdparty/kdsingleapplicationguard/kdtoolsglobal.cpp
thirdparty/kdsingleapplicationguard/kdlockedsharedmemorypointer.cpp
)
set( libUI ${libUI}
widgets/PlaylistTypeSelectorDialog.ui
widgets/NewPlaylistWidget.ui
widgets/SearchWidget.ui
widgets/WelcomeWidget.ui
widgets/WhatsHotWidget.ui
widgets/NewReleasesWidget.ui
widgets/SocialPlaylistWidget.ui
widgets/infowidgets/SourceInfoWidget.ui
widgets/infowidgets/ArtistInfoWidget.ui
widgets/infowidgets/AlbumInfoWidget.ui
playlist/topbar/TopBar.ui
playlist/QueueView.ui
context/ContextWidget.ui
infobar/InfoBar.ui
)
include_directories( . ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/.. ..
${CMAKE_CURRENT_SOURCE_DIR}
${QT_INCLUDE_DIR}
${QJSON_INCLUDE_DIR}
${LIBECHONEST_INCLUDE_DIR}
${LIBECHONEST_INCLUDE_DIR}/..
${CLUCENE_INCLUDE_DIRS}
${PHONON_INCLUDES}
${CMAKE_BINARY_DIR}/thirdparty/liblastfm2/src
playlist
${LIBPORTFWD_INCLUDE_DIR}
${THIRDPARTY_DIR}/qxt/qxtweb-standalone/qxtweb
${QuaZip_INCLUDE_DIR}
)
IF(QCA2_FOUND)
INCLUDE_DIRECTORIES( ${QCA2_INCLUDE_DIR} )
ENDIF(QCA2_FOUND)
IF(LIBATTICA_FOUND)
SET( libGuiSources ${libGuiSources} AtticaManager.cpp )
SET( libGuiHeaders ${libGuiHeaders} AtticaManager.h )
INCLUDE_DIRECTORIES( ${LIBATTICA_INCLUDE_DIR} )
ENDIF(LIBATTICA_FOUND)
IF( UNIX AND NOT APPLE )
LIST(APPEND libGuiSources
infosystem/infoplugins/unix/MprisPluginRootAdaptor.cpp
infosystem/infoplugins/unix/MprisPluginPlayerAdaptor.cpp
infosystem/infoplugins/unix/MprisPlugin.cpp
infosystem/infoplugins/unix/FdoNotifyPlugin.cpp
infosystem/infoplugins/unix/ImageConverter.cpp )
LIST(APPEND libGuiHeaders
infosystem/infoplugins/unix/MprisPluginRootAdaptor.h
infosystem/infoplugins/unix/MprisPluginPlayerAdaptor.h
infosystem/infoplugins/unix/MprisPlugin.h
infosystem/infoplugins/unix/FdoNotifyPlugin.h )
IF( BUILD_GUI AND X11_FOUND )
INCLUDE_DIRECTORIES( ${THIRDPARTY_DIR}/libqnetwm )
SET( libSources ${libSources} ${THIRDPARTY_DIR}/libqnetwm/libqnetwm/netwm.cpp )
SET( LINK_LIBRARIES ${LINK_LIBRARIES} ${X11_LIBRARIES} )
ENDIF()
ENDIF( UNIX AND NOT APPLE )
IF( WIN32 )
SET( OS_SPECIFIC_LINK_LIBRARIES
${OS_SPECIFIC_LINK_LIBRARIES}
# System
"iphlpapi.a"
"ws2_32.dll"
"dnsapi.dll"
"dsound.dll"
"winmm.dll"
"advapi32.dll"
"shlwapi.dll"
)
ENDIF( WIN32 )
IF( APPLE )
FIND_LIBRARY( COREAUDIO_LIBRARY CoreAudio )
FIND_LIBRARY( COREFOUNDATION_LIBRARY CoreFoundation )
FIND_LIBRARY( FOUNDATION_LIBRARY Foundation )
FIND_LIBRARY( SCRIPTINGBRIDGE_LIBRARY ScriptingBridge )
MARK_AS_ADVANCED( COREAUDIO_LIBRARY COREFOUNDATION_LIBRARY FOUNDATION_LIBRARY SCRIPTINGBRIDGE_LIBRARY )
SET( libSources ${libSources}
infosystem/infoplugins/mac/Adium.mm
infosystem/infoplugins/mac/AdiumPlugin.cpp
utils/tomahawkutils_mac.mm
thirdparty/Qocoa/qsearchfield_mac.mm )
SET_SOURCE_FILES_PROPERTIES(utils/tomahawkutils_mac.mm PROPERTIES COMPILE_FLAGS "-fvisibility=default")
SET( OS_SPECIFIC_LINK_LIBRARIES
${OS_SPECIFIC_LINK_LIBRARIES}
# System
${COREAUDIO_LIBRARY}
${COREFOUNDATION_LIBRARY}
${FOUNDATION_LIBRARY}
${SCRIPTINGBRIDGE_LIBRARY}
/System/Library/Frameworks/AppKit.framework
)
ELSE( APPLE )
SET( libGuiSources ${libGuiSources} thirdparty/Qocoa/qsearchfield.cpp )
ENDIF( APPLE )
IF(LIBLASTFM_FOUND)
SET(LINK_LIBRARIES ${LINK_LIBRARIES} tomahawk_lastfm2 )
ENDIF(LIBLASTFM_FOUND)
IF(BUILD_GUI)
LIST(APPEND libSources ${libGuiSources} )
ENDIF()
qt4_wrap_ui( libUI_H ${libUI} )
SET( libSources ${libSources} ${libUI_H} )
ADD_LIBRARY( tomahawklib SHARED ${libSources})
set_target_properties(tomahawklib PROPERTIES AUTOMOC TRUE)
IF(QCA2_FOUND)
SET(LINK_LIBRARIES ${LINK_LIBRARIES} ${QCA2_LIBRARIES} )
ENDIF(QCA2_FOUND)
IF(LIBATTICA_FOUND)
SET( LINK_LIBRARIES ${LINK_LIBRARIES} ${LIBATTICA_LIBRARIES} ${QuaZip_LIBRARIES} )
ENDIF(LIBATTICA_FOUND)
TARGET_LINK_LIBRARIES( tomahawklib
# Thirdparty shipped with tomahawk
${LIBPORTFWD_LIBRARIES}
# External deps
${QJSON_LIBRARIES}
${PHONON_LIBS}
${TAGLIB_LIBRARIES}
${CLUCENE_LIBRARIES}
${LIBECHONEST_LIBRARY}
${QT_QTSQL_LIBRARY}
${QT_QTUITOOLS_LIBRARY}
${QT_QTGUI_LIBRARY}
${QT_QTSCRIPT_LIBRARY}
${OS_SPECIFIC_LINK_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT}
${LINK_LIBRARIES}
)
INSTALL( TARGETS tomahawklib
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
)