diff --git a/CMakeLists.txt b/CMakeLists.txt index 361e7f25e7..4d1bd93074 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -403,1074 +403,27 @@ if(WIN32 AND NOT ENABLE_WIN32_CONSOLE) endif() set(SOURCES - src/core/logging.cpp - src/core/mainwindow.cpp - src/core/application.cpp - src/core/playerinterface.cpp - src/core/player.cpp - src/core/commandlineoptions.cpp - src/core/database.cpp - src/core/memorydatabase.cpp - src/core/sqlquery.cpp - src/core/sqlrow.cpp - src/core/metatypes.cpp - src/core/deletefiles.cpp - src/core/filesystemmusicstorage.cpp - src/core/filesystemwatcherinterface.cpp - src/core/mergedproxymodel.cpp - src/core/multisortfilterproxy.cpp - src/core/musicstorage.cpp - src/core/networkaccessmanager.cpp - src/core/threadsafenetworkdiskcache.cpp - src/core/networktimeouts.cpp - src/core/networkproxyfactory.cpp - src/core/qtfslistener.cpp - src/core/settings.cpp - src/core/settingsprovider.cpp - src/core/signalchecker.cpp - src/core/song.cpp - src/core/songloader.cpp - src/core/stylehelper.cpp - src/core/stylesheetloader.cpp - src/core/taskmanager.cpp - src/core/thread.cpp - src/core/urlhandler.cpp - src/core/urlhandlers.cpp - src/core/iconloader.cpp - src/core/standarditemiconloader.cpp - src/core/scopedtransaction.cpp - src/core/translations.cpp - src/core/localredirectserver.cpp - src/core/mimedata.cpp - src/core/temporaryfile.cpp - src/core/enginemetadata.cpp - src/core/songmimedata.cpp - src/core/platforminterface.cpp - - src/utilities/strutils.cpp - src/utilities/envutils.cpp - src/utilities/colorutils.cpp - src/utilities/cryptutils.cpp - src/utilities/fileutils.cpp - src/utilities/diskutils.cpp - src/utilities/imageutils.cpp - src/utilities/macaddrutils.cpp - src/utilities/mimeutils.cpp - src/utilities/randutils.cpp - src/utilities/threadutils.cpp - src/utilities/timeutils.cpp - src/utilities/transliterate.cpp - src/utilities/xmlutils.cpp - src/utilities/filemanagerutils.cpp - src/utilities/coverutils.cpp - src/utilities/screenutils.cpp - src/utilities/textencodingutils.cpp - src/utilities/coveroptions.cpp - - src/tagreader/tagreaderclient.cpp - src/tagreader/tagreaderresult.cpp - src/tagreader/tagreaderbase.cpp - src/tagreader/tagreadertaglib.cpp - src/tagreader/tagreadergme.cpp - src/tagreader/tagreaderrequest.cpp - src/tagreader/tagreaderismediafilerequest.cpp - src/tagreader/tagreaderreadfilerequest.cpp - src/tagreader/tagreaderwritefilerequest.cpp - src/tagreader/tagreaderloadcoverdatarequest.cpp - src/tagreader/tagreaderloadcoverimagerequest.cpp - src/tagreader/tagreadersavecoverrequest.cpp - src/tagreader/tagreadersaveplaycountrequest.cpp - src/tagreader/tagreadersaveratingrequest.cpp - src/tagreader/albumcovertagdata.cpp - src/tagreader/savetagcoverdata.cpp - src/tagreader/tagreaderreply.cpp - src/tagreader/tagreaderreadfilereply.cpp - src/tagreader/tagreaderloadcoverdatareply.cpp - src/tagreader/tagreaderloadcoverimagereply.cpp - - src/filterparser/filterparser.cpp - src/filterparser/filtertree.cpp - src/filterparser/filtertreeand.cpp - src/filterparser/filtertreecolumnterm.cpp - src/filterparser/filtertreenop.cpp - src/filterparser/filtertreenot.cpp - src/filterparser/filtertreeor.cpp - src/filterparser/filtertreeterm.cpp - src/filterparser/filterparserfloateqcomparator.cpp - src/filterparser/filterparserfloatgecomparator.cpp - src/filterparser/filterparserfloatgtcomparator.cpp - src/filterparser/filterparserfloatlecomparator.cpp - src/filterparser/filterparserfloatltcomparator.cpp - src/filterparser/filterparserfloatnecomparator.cpp - src/filterparser/filterparserint64eqcomparator.cpp - src/filterparser/filterparserint64gecomparator.cpp - src/filterparser/filterparserint64gtcomparator.cpp - src/filterparser/filterparserint64lecomparator.cpp - src/filterparser/filterparserint64ltcomparator.cpp - src/filterparser/filterparserint64necomparator.cpp - src/filterparser/filterparserinteqcomparator.cpp - src/filterparser/filterparserintgecomparator.cpp - src/filterparser/filterparserintgtcomparator.cpp - src/filterparser/filterparserintlecomparator.cpp - src/filterparser/filterparserintltcomparator.cpp - src/filterparser/filterparserintnecomparator.cpp - src/filterparser/filterparsersearchtermcomparator.cpp - src/filterparser/filterparsertextcontainscomparator.cpp - src/filterparser/filterparsertexteqcomparator.cpp - src/filterparser/filterparsertextnecomparator.cpp - src/filterparser/filterparseruinteqcomparator.cpp - src/filterparser/filterparseruintgecomparator.cpp - src/filterparser/filterparseruintgtcomparator.cpp - src/filterparser/filterparseruintlecomparator.cpp - src/filterparser/filterparseruintltcomparator.cpp - src/filterparser/filterparseruintnecomparator.cpp - - src/engine/enginebase.cpp - src/engine/enginedevice.cpp - src/engine/devicefinders.cpp - src/engine/devicefinder.cpp - src/engine/gststartup.cpp - src/engine/gstengine.cpp - src/engine/gstenginepipeline.cpp - - src/analyzer/fht.cpp - src/analyzer/analyzerbase.cpp - src/analyzer/analyzercontainer.cpp - src/analyzer/blockanalyzer.cpp - src/analyzer/boomanalyzer.cpp - src/analyzer/turbineanalyzer.cpp - src/analyzer/sonogramanalyzer.cpp - src/analyzer/waverubberanalyzer.cpp - src/analyzer/rainbowanalyzer.cpp - - src/equalizer/equalizer.cpp - src/equalizer/equalizerslider.cpp - - src/context/contextview.cpp - src/context/contextalbum.cpp - - src/collection/collectionlibrary.cpp - src/collection/collectionmodel.cpp - src/collection/collectionbackend.cpp - src/collection/collectionwatcher.cpp - src/collection/collectionview.cpp - src/collection/collectionitem.cpp - src/collection/collectionitemdelegate.cpp - src/collection/collectionviewcontainer.cpp - src/collection/collectiondirectorymodel.cpp - src/collection/collectionfilteroptions.cpp - src/collection/collectionfilterwidget.cpp - src/collection/collectionfilter.cpp - src/collection/collectionplaylistitem.cpp - src/collection/collectionquery.cpp - src/collection/savedgroupingmanager.cpp - src/collection/groupbydialog.cpp - src/collection/collectiontask.cpp - src/collection/collectionmodelupdate.cpp - - src/playlist/playlist.cpp - src/playlist/playlistbackend.cpp - src/playlist/playlistcontainer.cpp - src/playlist/playlistdelegates.cpp - src/playlist/playlistfilter.cpp - src/playlist/playlistheader.cpp - src/playlist/playlistitem.cpp - src/playlist/playlistitemmimedata.cpp - src/playlist/playlistlistcontainer.cpp - src/playlist/playlistlistmodel.cpp - src/playlist/playlistlistsortfiltermodel.cpp - src/playlist/playlistlistview.cpp - src/playlist/playlistmanagerinterface.cpp - src/playlist/playlistmanager.cpp - src/playlist/playlistsaveoptionsdialog.cpp - src/playlist/playlistsequence.cpp - src/playlist/playlisttabbar.cpp - src/playlist/playlistview.cpp - src/playlist/playlistproxystyle.cpp - src/playlist/songloaderinserter.cpp - src/playlist/songplaylistitem.cpp - src/playlist/dynamicplaylistcontrols.cpp - src/playlist/playlistundocommandbase.cpp - src/playlist/playlistundocommandinsertitems.cpp - src/playlist/playlistundocommandremoveitems.cpp - src/playlist/playlistundocommandmoveitems.cpp - src/playlist/playlistundocommandreorderitems.cpp - src/playlist/playlistundocommandsortitems.cpp - src/playlist/playlistundocommandshuffleitems.cpp - - src/queue/queue.cpp - src/queue/queueview.cpp - - src/playlistparsers/asxiniparser.cpp - src/playlistparsers/asxparser.cpp - src/playlistparsers/cueparser.cpp - src/playlistparsers/m3uparser.cpp - src/playlistparsers/parserbase.cpp - src/playlistparsers/playlistparser.cpp - src/playlistparsers/plsparser.cpp - src/playlistparsers/wplparser.cpp - src/playlistparsers/xmlparser.cpp - src/playlistparsers/xspfparser.cpp - - src/smartplaylists/playlistgenerator.cpp - src/smartplaylists/playlistgeneratorinserter.cpp - src/smartplaylists/playlistgeneratormimedata.cpp - src/smartplaylists/playlistquerygenerator.cpp - src/smartplaylists/smartplaylistquerywizardplugin.cpp - src/smartplaylists/smartplaylistquerywizardpluginsortpage.cpp - src/smartplaylists/smartplaylistquerywizardpluginsearchpage.cpp - src/smartplaylists/smartplaylistsearch.cpp - src/smartplaylists/smartplaylistsearchpreview.cpp - src/smartplaylists/smartplaylistsearchterm.cpp - src/smartplaylists/smartplaylistsearchtermwidget.cpp - src/smartplaylists/smartplaylistsearchtermwidgetoverlay.cpp - src/smartplaylists/smartplaylistsmodel.cpp - src/smartplaylists/smartplaylistsviewcontainer.cpp - src/smartplaylists/smartplaylistsview.cpp - src/smartplaylists/smartplaylistwizard.cpp - src/smartplaylists/smartplaylistwizardplugin.cpp - src/smartplaylists/smartplaylistwizardtypepage.cpp - src/smartplaylists/smartplaylistwizardfinishpage.cpp - - src/covermanager/albumcovermanager.cpp - src/covermanager/albumcovermanagerlist.cpp - src/covermanager/albumcoverloader.cpp - src/covermanager/albumcoverloaderoptions.cpp - src/covermanager/albumcoverfetcher.cpp - src/covermanager/albumcoverfetchersearch.cpp - src/covermanager/albumcoversearcher.cpp - src/covermanager/albumcoverexport.cpp - src/covermanager/albumcoverexporter.cpp - src/covermanager/albumcoverchoicecontroller.cpp - src/covermanager/coverprovider.cpp - src/covermanager/coverproviders.cpp - src/covermanager/coversearchstatistics.cpp - src/covermanager/coversearchstatisticsdialog.cpp - src/covermanager/coverexportrunnable.cpp - src/covermanager/currentalbumcoverloader.cpp - src/covermanager/coverfromurldialog.cpp - src/covermanager/jsoncoverprovider.cpp - src/covermanager/lastfmcoverprovider.cpp - src/covermanager/musicbrainzcoverprovider.cpp - src/covermanager/discogscoverprovider.cpp - src/covermanager/deezercoverprovider.cpp - src/covermanager/musixmatchcoverprovider.cpp - src/covermanager/opentidalcoverprovider.cpp - - src/lyrics/lyricsproviders.cpp - src/lyrics/lyricsprovider.cpp - src/lyrics/lyricssearchrequest.h - src/lyrics/lyricssearchresult.h - src/lyrics/lyricsfetcher.cpp - src/lyrics/lyricsfetchersearch.cpp - src/lyrics/jsonlyricsprovider.cpp - src/lyrics/htmllyricsprovider.cpp - src/lyrics/ovhlyricsprovider.cpp - src/lyrics/lololyricsprovider.cpp - src/lyrics/geniuslyricsprovider.cpp - src/lyrics/musixmatchlyricsprovider.cpp - src/lyrics/chartlyricsprovider.cpp - src/lyrics/songlyricscomlyricsprovider.cpp - src/lyrics/azlyricscomlyricsprovider.cpp - src/lyrics/elyricsnetlyricsprovider.cpp - src/lyrics/letraslyricsprovider.cpp - src/lyrics/lyricfindlyricsprovider.cpp - - src/providers/musixmatchprovider.cpp - - src/settings/settingsdialog.cpp - src/settings/settingspage.cpp - src/settings/settingsitemdelegate.cpp - src/settings/behavioursettingspage.cpp - src/settings/collectionsettingspage.cpp - src/settings/collectionsettingsdirectorymodel.cpp - src/settings/backendsettingspage.cpp - src/settings/playlistsettingspage.cpp - src/settings/scrobblersettingspage.cpp - src/settings/coverssettingspage.cpp - src/settings/lyricssettingspage.cpp - src/settings/networkproxysettingspage.cpp - src/settings/appearancesettingspage.cpp - src/settings/contextsettingspage.cpp - src/settings/notificationssettingspage.cpp - src/settings/transcodersettingspage.cpp - - src/dialogs/about.cpp - src/dialogs/console.cpp - src/dialogs/errordialog.cpp - src/dialogs/edittagdialog.cpp - src/dialogs/trackselectiondialog.cpp - src/dialogs/addstreamdialog.cpp - src/dialogs/userpassdialog.cpp - src/dialogs/deleteconfirmationdialog.cpp - src/dialogs/lastfmimportdialog.cpp - src/dialogs/messagedialog.cpp - src/dialogs/snapdialog.cpp - src/dialogs/saveplaylistsdialog.cpp - - src/widgets/autoexpandingtreeview.cpp - src/widgets/busyindicator.cpp - src/widgets/clickablelabel.cpp - src/widgets/fancytabwidget.cpp - src/widgets/fancytabbar.cpp - src/widgets/fancytabdata.cpp - src/widgets/favoritewidget.cpp - src/widgets/forcescrollperpixel.cpp - src/widgets/freespacebar.cpp - src/widgets/groupediconview.cpp - src/widgets/lineedit.cpp - src/widgets/linetextedit.cpp - src/widgets/multiloadingindicator.cpp - src/widgets/playingwidget.cpp - src/widgets/renametablineedit.cpp - src/widgets/sliderslider.cpp - src/widgets/prettyslider.cpp - src/widgets/volumeslider.cpp - src/widgets/stickyslider.cpp - src/widgets/stretchheaderview.cpp - src/widgets/trackslider.cpp - src/widgets/tracksliderpopup.cpp - src/widgets/tracksliderslider.cpp - src/widgets/loginstatewidget.cpp - src/widgets/ratingwidget.cpp - src/widgets/resizabletextedit.cpp - - src/osd/osdbase.cpp - src/osd/osdpretty.cpp - - src/streaming/streamingservices.cpp - src/streaming/streamingservice.cpp - src/streaming/streamplaylistitem.cpp - src/streaming/streamingsearchview.cpp - src/streaming/streamingsearchmodel.cpp - src/streaming/streamingsearchsortmodel.cpp - src/streaming/streamingsearchitemdelegate.cpp - src/streaming/streamingsongsview.cpp - src/streaming/streamingtabsview.cpp - src/streaming/streamingcollectionview.cpp - src/streaming/streamingcollectionviewcontainer.cpp - src/streaming/streamingsearchview.cpp - src/streaming/streamsongmimedata.cpp - - src/radios/radioservices.cpp - src/radios/radiobackend.cpp - src/radios/radiomodel.cpp - src/radios/radioview.cpp - src/radios/radioviewcontainer.cpp - src/radios/radioservice.cpp - src/radios/radioplaylistitem.cpp - src/radios/radiochannel.cpp - src/radios/somafmservice.cpp - src/radios/radioparadiseservice.cpp - src/radios/radiomimedata.cpp - - src/scrobbler/audioscrobbler.cpp - src/scrobbler/scrobblersettingsservice.cpp - src/scrobbler/scrobblerservice.cpp - src/scrobbler/scrobblercache.cpp - src/scrobbler/scrobblercacheitem.cpp - src/scrobbler/scrobblemetadata.cpp - src/scrobbler/scrobblingapi20.cpp - src/scrobbler/lastfmscrobbler.cpp - src/scrobbler/librefmscrobbler.cpp - src/scrobbler/listenbrainzscrobbler.cpp - src/scrobbler/lastfmimport.cpp - - src/organize/organize.cpp - src/organize/organizeformat.cpp - src/organize/organizeformatvalidator.cpp - src/organize/organizesyntaxhighlighter.cpp - src/organize/organizedialog.cpp - src/organize/organizeerrordialog.cpp - - src/transcoder/transcoder.cpp - src/transcoder/transcoderoptionsinterface.cpp - src/transcoder/transcodedialog.cpp - src/transcoder/transcoderoptionsdialog.cpp - src/transcoder/transcoderoptionsflac.cpp - src/transcoder/transcoderoptionswavpack.cpp - src/transcoder/transcoderoptionsvorbis.cpp - src/transcoder/transcoderoptionsopus.cpp - src/transcoder/transcoderoptionsspeex.cpp - src/transcoder/transcoderoptionsaac.cpp - src/transcoder/transcoderoptionsasf.cpp - src/transcoder/transcoderoptionsmp3.cpp - - src/systemtrayicon/systemtrayicon.cpp - - src/fileview/fileview.cpp - src/fileview/fileviewlist.cpp - - src/device/devicemanager.cpp - src/device/devicelister.cpp - src/device/devicedatabasebackend.cpp - src/device/deviceinfo.cpp - src/device/deviceproperties.cpp - src/device/filesystemdevice.cpp - src/device/connecteddevice.cpp - src/device/devicestatefiltermodel.cpp - src/device/deviceviewcontainer.cpp - src/device/deviceview.cpp + src/main/main.cpp + src/main/mainwindow.cpp + src/main/application.cpp + src/main/metatypes.cpp + src/main/translations.cpp ) set(HEADERS - src/core/logging.h - src/core/mainwindow.h - src/core/application.h - src/core/player.h - src/core/playerinterface.h - src/core/database.h - src/core/memorydatabase.h - src/core/deletefiles.h - src/core/filesystemwatcherinterface.h - src/core/mergedproxymodel.h - src/core/multisortfilterproxy.h - src/core/networkaccessmanager.h - src/core/threadsafenetworkdiskcache.h - src/core/networktimeouts.h - src/core/qtfslistener.h - src/core/settings.h - src/core/songloader.h - src/core/taskmanager.h - src/core/thread.h - src/core/urlhandlers.h - src/core/urlhandler.h - src/core/standarditemiconloader.h - src/core/mimedata.h - src/core/stylesheetloader.h - src/core/localredirectserver.h - src/core/songmimedata.h - - src/tagreader/tagreaderclient.h - src/tagreader/tagreaderreply.h - src/tagreader/tagreaderreadfilereply.h - src/tagreader/tagreaderloadcoverdatareply.h - src/tagreader/tagreaderloadcoverimagereply.h - - src/engine/enginebase.h - src/engine/devicefinders.h - src/engine/gststartup.h - src/engine/gstengine.h - src/engine/gstenginepipeline.h - - src/analyzer/analyzerbase.h - src/analyzer/analyzercontainer.h - src/analyzer/blockanalyzer.h - src/analyzer/boomanalyzer.h - src/analyzer/turbineanalyzer.h - src/analyzer/sonogramanalyzer.h - src/analyzer/waverubberanalyzer.h - src/analyzer/rainbowanalyzer.h - - src/equalizer/equalizer.h - src/equalizer/equalizerslider.h - - src/context/contextview.h - src/context/contextalbum.h - - src/collection/collectionlibrary.h - src/collection/collectionmodel.h - src/collection/collectionbackend.h - src/collection/collectionwatcher.h - src/collection/collectionview.h - src/collection/collectionitemdelegate.h - src/collection/collectionviewcontainer.h - src/collection/collectiondirectorymodel.h - src/collection/collectionfilterwidget.h - src/collection/collectionfilter.h - src/collection/savedgroupingmanager.h - src/collection/groupbydialog.h - - src/playlist/playlist.h - src/playlist/playlistbackend.h - src/playlist/playlistcontainer.h - src/playlist/playlistdelegates.h - src/playlist/playlistfilter.h - src/playlist/playlistheader.h - src/playlist/playlistlistcontainer.h - src/playlist/playlistlistmodel.h - src/playlist/playlistlistview.h - src/playlist/playlistlistsortfiltermodel.h - src/playlist/playlistmanagerinterface.h - src/playlist/playlistmanager.h - src/playlist/playlistsaveoptionsdialog.h - src/playlist/playlistsequence.h - src/playlist/playlisttabbar.h - src/playlist/playlistview.h - src/playlist/playlistproxystyle.h - src/playlist/playlistitemmimedata.h - src/playlist/songloaderinserter.h - src/playlist/dynamicplaylistcontrols.h - - src/queue/queue.h - src/queue/queueview.h - - src/playlistparsers/asxiniparser.h - src/playlistparsers/asxparser.h - src/playlistparsers/cueparser.h - src/playlistparsers/m3uparser.h - src/playlistparsers/parserbase.h - src/playlistparsers/playlistparser.h - src/playlistparsers/plsparser.h - src/playlistparsers/wplparser.h - src/playlistparsers/xmlparser.h - src/playlistparsers/xspfparser.h - - src/smartplaylists/playlistgenerator.h - src/smartplaylists/playlistgeneratorinserter.h - src/smartplaylists/playlistquerygenerator.h - src/smartplaylists/playlistgeneratormimedata.h - src/smartplaylists/smartplaylistquerywizardplugin.h - src/smartplaylists/smartplaylistquerywizardpluginsortpage.h - src/smartplaylists/smartplaylistquerywizardpluginsearchpage.h - src/smartplaylists/smartplaylistsearchpreview.h - src/smartplaylists/smartplaylistsearchtermwidget.h - src/smartplaylists/smartplaylistsearchtermwidgetoverlay.h - src/smartplaylists/smartplaylistsmodel.h - src/smartplaylists/smartplaylistsviewcontainer.h - src/smartplaylists/smartplaylistsview.h - src/smartplaylists/smartplaylistwizard.h - src/smartplaylists/smartplaylistwizardplugin.h - src/smartplaylists/smartplaylistwizardtypepage.h - src/smartplaylists/smartplaylistwizardfinishpage.h - - src/covermanager/albumcovermanager.h - src/covermanager/albumcovermanagerlist.h - src/covermanager/albumcoverloader.h - src/covermanager/albumcoverfetcher.h - src/covermanager/albumcoverfetchersearch.h - src/covermanager/albumcoversearcher.h - src/covermanager/albumcoverexport.h - src/covermanager/albumcoverexporter.h - src/covermanager/albumcoverchoicecontroller.h - src/covermanager/coverprovider.h - src/covermanager/coverproviders.h - src/covermanager/coversearchstatisticsdialog.h - src/covermanager/coverexportrunnable.h - src/covermanager/currentalbumcoverloader.h - src/covermanager/coverfromurldialog.h - src/covermanager/jsoncoverprovider.h - src/covermanager/lastfmcoverprovider.h - src/covermanager/musicbrainzcoverprovider.h - src/covermanager/discogscoverprovider.h - src/covermanager/deezercoverprovider.h - src/covermanager/musixmatchcoverprovider.h - src/covermanager/opentidalcoverprovider.h - - src/lyrics/lyricsproviders.h - src/lyrics/lyricsprovider.h - src/lyrics/lyricsfetcher.h - src/lyrics/lyricsfetchersearch.h - src/lyrics/jsonlyricsprovider.h - src/lyrics/htmllyricsprovider.h - src/lyrics/ovhlyricsprovider.h - src/lyrics/lololyricsprovider.h - src/lyrics/geniuslyricsprovider.h - src/lyrics/musixmatchlyricsprovider.h - src/lyrics/chartlyricsprovider.h - src/lyrics/songlyricscomlyricsprovider.h - src/lyrics/azlyricscomlyricsprovider.h - src/lyrics/elyricsnetlyricsprovider.h - src/lyrics/letraslyricsprovider.h - src/lyrics/lyricfindlyricsprovider.h - - src/settings/settingsdialog.h - src/settings/settingspage.h - src/settings/settingsitemdelegate.h - src/settings/behavioursettingspage.h - src/settings/collectionsettingspage.h - src/settings/collectionsettingsdirectorymodel.h - src/settings/backendsettingspage.h - src/settings/playlistsettingspage.h - src/settings/scrobblersettingspage.h - src/settings/coverssettingspage.h - src/settings/lyricssettingspage.h - src/settings/networkproxysettingspage.h - src/settings/appearancesettingspage.h - src/settings/contextsettingspage.h - src/settings/notificationssettingspage.h - src/settings/transcodersettingspage.h - - src/dialogs/about.h - src/dialogs/errordialog.h - src/dialogs/console.h - src/dialogs/edittagdialog.h - src/dialogs/trackselectiondialog.h - src/dialogs/addstreamdialog.h - src/dialogs/userpassdialog.h - src/dialogs/deleteconfirmationdialog.h - src/dialogs/lastfmimportdialog.h - src/dialogs/messagedialog.h - src/dialogs/snapdialog.h - src/dialogs/saveplaylistsdialog.h - - src/widgets/autoexpandingtreeview.h - src/widgets/busyindicator.h - src/widgets/clickablelabel.h - src/widgets/fancytabwidget.h - src/widgets/fancytabbar.h - src/widgets/fancytabdata.h - src/widgets/favoritewidget.h - src/widgets/freespacebar.h - src/widgets/groupediconview.h - src/widgets/lineedit.h - src/widgets/linetextedit.h - src/widgets/multiloadingindicator.h - src/widgets/playingwidget.h - src/widgets/renametablineedit.h - src/widgets/sliderslider.h - src/widgets/prettyslider.h - src/widgets/volumeslider.h - src/widgets/stickyslider.h - src/widgets/stretchheaderview.h - src/widgets/trackslider.h - src/widgets/tracksliderpopup.h - src/widgets/tracksliderslider.h - src/widgets/loginstatewidget.h - src/widgets/searchfield.h - src/widgets/ratingwidget.h - src/widgets/forcescrollperpixel.h - src/widgets/resizabletextedit.h - - src/osd/osdbase.h - src/osd/osdpretty.h - - src/streaming/streamingservices.h - src/streaming/streamingservice.h - src/streaming/streamsongmimedata.h - src/streaming/streamingsearchmodel.h - src/streaming/streamingsearchsortmodel.h - src/streaming/streamingsearchitemdelegate.h - src/streaming/streamingsearchview.h - src/streaming/streamingsongsview.h - src/streaming/streamingtabsview.h - src/streaming/streamingcollectionview.h - src/streaming/streamingcollectionviewcontainer.h - - src/radios/radioservices.h - src/radios/radiobackend.h - src/radios/radiomodel.h - src/radios/radioview.h - src/radios/radioviewcontainer.h - src/radios/radioservice.h - src/radios/radiomimedata.h - src/radios/somafmservice.h - src/radios/radioparadiseservice.h - - src/scrobbler/audioscrobbler.h - src/scrobbler/scrobblersettingsservice.h - src/scrobbler/scrobblerservice.h - src/scrobbler/scrobblercache.h - src/scrobbler/scrobblingapi20.h - src/scrobbler/lastfmscrobbler.h - src/scrobbler/librefmscrobbler.h - src/scrobbler/listenbrainzscrobbler.h - src/scrobbler/lastfmimport.h - - src/organize/organize.h - src/organize/organizeformatvalidator.h - src/organize/organizesyntaxhighlighter.h - src/organize/organizedialog.h - src/organize/organizeerrordialog.h - - src/transcoder/transcoder.h - src/transcoder/transcodedialog.h - src/transcoder/transcoderoptionsdialog.h - src/transcoder/transcoderoptionsinterface.h - src/transcoder/transcoderoptionsflac.h - src/transcoder/transcoderoptionswavpack.h - src/transcoder/transcoderoptionsvorbis.h - src/transcoder/transcoderoptionsopus.h - src/transcoder/transcoderoptionsspeex.h - src/transcoder/transcoderoptionsaac.h - src/transcoder/transcoderoptionsasf.h - src/transcoder/transcoderoptionsmp3.h - - src/fileview/fileview.h - src/fileview/fileviewlist.h - - src/device/devicemanager.h - src/device/devicelister.h - src/device/devicedatabasebackend.h - src/device/deviceproperties.h - src/device/filesystemdevice.h - src/device/connecteddevice.h - src/device/devicestatefiltermodel.h - src/device/deviceviewcontainer.h - src/device/deviceview.h + src/main/mainwindow.h + src/main/application.h ) set(UI - - src/core/mainwindow.ui - - src/collection/groupbydialog.ui - src/collection/collectionfilterwidget.ui - src/collection/collectionviewcontainer.ui - src/collection/savedgroupingmanager.ui - - src/playlist/playlistcontainer.ui - src/playlist/playlistlistcontainer.ui - src/playlist/playlistsaveoptionsdialog.ui - src/playlist/playlistsequence.ui - src/playlist/dynamicplaylistcontrols.ui - - src/queue/queueview.ui - - src/smartplaylists/smartplaylistquerysearchpage.ui - src/smartplaylists/smartplaylistquerysortpage.ui - src/smartplaylists/smartplaylistsearchpreview.ui - src/smartplaylists/smartplaylistsearchtermwidget.ui - src/smartplaylists/smartplaylistsviewcontainer.ui - src/smartplaylists/smartplaylistwizardfinishpage.ui - - src/covermanager/albumcoverexport.ui - src/covermanager/albumcovermanager.ui - src/covermanager/albumcoversearcher.ui - src/covermanager/coversearchstatisticsdialog.ui - src/covermanager/coverfromurldialog.ui - - src/settings/settingsdialog.ui - src/settings/behavioursettingspage.ui - src/settings/collectionsettingspage.ui - src/settings/backendsettingspage.ui - src/settings/contextsettingspage.ui - src/settings/playlistsettingspage.ui - src/settings/scrobblersettingspage.ui - src/settings/coverssettingspage.ui - src/settings/lyricssettingspage.ui - src/settings/networkproxysettingspage.ui - src/settings/appearancesettingspage.ui - src/settings/notificationssettingspage.ui - src/settings/transcodersettingspage.ui - - src/equalizer/equalizer.ui - src/equalizer/equalizerslider.ui - - src/dialogs/about.ui - src/dialogs/errordialog.ui - src/dialogs/console.ui - src/dialogs/edittagdialog.ui - src/dialogs/trackselectiondialog.ui - src/dialogs/addstreamdialog.ui - src/dialogs/userpassdialog.ui - src/dialogs/lastfmimportdialog.ui - src/dialogs/messagedialog.ui - src/dialogs/saveplaylistsdialog.ui - - src/widgets/trackslider.ui - src/widgets/loginstatewidget.ui - - src/osd/osdpretty.ui - - src/streaming/streamingtabsview.ui - src/streaming/streamingcollectionviewcontainer.ui - src/streaming/streamingsearchview.ui - - src/radios/radioviewcontainer.ui - - src/organize/organizedialog.ui - src/organize/organizeerrordialog.ui - - src/transcoder/transcodedialog.ui - src/transcoder/transcodelogdialog.ui - src/transcoder/transcoderoptionsaac.ui - src/transcoder/transcoderoptionsdialog.ui - src/transcoder/transcoderoptionsflac.ui - src/transcoder/transcoderoptionswavpack.ui - src/transcoder/transcoderoptionsvorbis.ui - src/transcoder/transcoderoptionsopus.ui - src/transcoder/transcoderoptionsspeex.ui - src/transcoder/transcoderoptionsasf.ui - src/transcoder/transcoderoptionsmp3.ui - - src/fileview/fileview.ui - - src/device/deviceproperties.ui - src/device/deviceviewcontainer.ui -) - -if(APPLE) - optional_source(APPLE - SOURCES - src/utilities/macosutils.mm - src/core/scoped_nsautorelease_pool.mm - src/core/mac_startup.mm - src/systemtrayicon/macsystemtrayicon.mm - src/osd/osdmac.mm - src/widgets/searchfield_mac.mm - src/engine/macosdevicefinder.cpp - src/device/macosdevicelister.mm - HEADERS - src/systemtrayicon/macsystemtrayicon.h - src/osd/osdmac.h - src/device/macosdevicelister.h - ) -else() - list(APPEND SOURCES src/systemtrayicon/qtsystemtrayicon.cpp src/widgets/searchfield_qt.cpp src/widgets/searchfield_qt_private.cpp) - list(APPEND HEADERS src/systemtrayicon/qtsystemtrayicon.h src/widgets/searchfield_qt_private.h) -endif() - -optional_source(WIN32 - SOURCES - src/utilities/scopedwchararray.cpp - src/utilities/winutils.cpp - src/engine/directsounddevicefinder.cpp - src/engine/mmdevicefinder.cpp - src/core/windows7thumbbar.cpp - HEADERS - src/core/windows7thumbbar.h -) - -if(HAVE_GLOBALSHORTCUTS) - - optional_source(HAVE_GLOBALSHORTCUTS - SOURCES src/globalshortcuts/globalshortcutsmanager.cpp src/globalshortcuts/globalshortcutsbackend.cpp src/globalshortcuts/globalshortcutgrabber.cpp src/settings/globalshortcutssettingspage.cpp - HEADERS src/globalshortcuts/globalshortcutsmanager.h src/globalshortcuts/globalshortcutsbackend.h src/globalshortcuts/globalshortcutgrabber.h src/settings/globalshortcutssettingspage.h - UI src/globalshortcuts/globalshortcutgrabber.ui src/settings/globalshortcutssettingspage.ui - ) - - if(HAVE_KDE_GLOBALSHORTCUTS) - optional_source(HAVE_KDE_GLOBALSHORTCUTS - SOURCES src/globalshortcuts/globalshortcutsbackend-kde.cpp - HEADERS src/globalshortcuts/globalshortcutsbackend-kde.h - ) - qt_add_dbus_interface(SOURCES src/globalshortcuts/org.kde.KGlobalAccel.xml kglobalaccel) - qt_add_dbus_interface(SOURCES src/globalshortcuts/org.kde.KGlobalAccel.Component.xml kglobalaccelcomponent) - endif() - - if(HAVE_GNOME_GLOBALSHORTCUTS) - optional_source(HAVE_GNOME_GLOBALSHORTCUTS - SOURCES src/globalshortcuts/globalshortcutsbackend-gnome.cpp - HEADERS src/globalshortcuts/globalshortcutsbackend-gnome.h - ) - qt_add_dbus_interface(SOURCES src/globalshortcuts/org.gnome.SettingsDaemon.MediaKeys.xml gnomesettingsdaemon) - endif() - - if(HAVE_MATE_GLOBALSHORTCUTS) - optional_source(HAVE_MATE_GLOBALSHORTCUTS - SOURCES src/globalshortcuts/globalshortcutsbackend-mate.cpp - HEADERS src/globalshortcuts/globalshortcutsbackend-mate.h - ) - qt_add_dbus_interface(SOURCES src/globalshortcuts/org.mate.SettingsDaemon.MediaKeys.xml matesettingsdaemon) - endif() - - optional_source(HAVE_X11_GLOBALSHORTCUTS - SOURCES src/globalshortcuts/globalshortcutsbackend-x11.cpp src/globalshortcuts/globalshortcut.cpp src/globalshortcuts/globalshortcut-x11.cpp - HEADERS src/globalshortcuts/globalshortcutsbackend-x11.h src/globalshortcuts/globalshortcut.h - ) - - optional_source(APPLE - SOURCES src/globalshortcuts/globalshortcutsbackend-macos.mm src/globalshortcuts/globalshortcutgrabber.mm - HEADERS src/globalshortcuts/globalshortcutsbackend-macos.h src/globalshortcuts/globalshortcutgrabber.h - ) - - optional_source(WIN32 - SOURCES src/globalshortcuts/globalshortcutsbackend-win.cpp src/globalshortcuts/globalshortcut.cpp src/globalshortcuts/globalshortcut-win.cpp - HEADERS src/globalshortcuts/globalshortcutsbackend-win.h src/globalshortcuts/globalshortcut.h - ) - -endif() - -optional_source(HAVE_ALSA SOURCES src/engine/alsadevicefinder.cpp src/engine/alsapcmdevicefinder.cpp) -optional_source(HAVE_PULSE SOURCES src/engine/pulsedevicefinder.cpp) -optional_source(MSVC SOURCES src/engine/uwpdevicefinder.cpp src/engine/asiodevicefinder.cpp) - -if(HAVE_SONGFINGERPRINTING OR HAVE_MUSICBRAINZ) - optional_source(CHROMAPRINT_FOUND SOURCES src/engine/chromaprinter.cpp) -endif() - -optional_source(HAVE_MUSICBRAINZ - SOURCES - src/musicbrainz/acoustidclient.cpp - src/musicbrainz/musicbrainzclient.cpp - src/musicbrainz/tagfetcher.cpp - HEADERS - src/musicbrainz/acoustidclient.h - src/musicbrainz/musicbrainzclient.h - src/musicbrainz/tagfetcher.h -) - -optional_source(HAVE_EBUR128 SOURCES src/engine/ebur128analysis.cpp) - -if(HAVE_DBUS) - optional_source(HAVE_DBUS SOURCES src/osd/osddbus.cpp HEADERS src/osd/osddbus.h) - qt_add_dbus_interface(SOURCES src/osd/org.freedesktop.Notifications.xml notification) -endif() - -if(HAVE_MPRIS2) - optional_source(HAVE_MPRIS2 SOURCES src/mpris2/mpris2.cpp HEADERS src/mpris2/mpris2.h) - qt_add_dbus_adaptor(SOURCES src/mpris2/org.mpris.MediaPlayer2.xml src/mpris2/mpris2.h mpris::Mpris2 mpris2_root Mpris2Root) - qt_add_dbus_adaptor(SOURCES src/mpris2/org.mpris.MediaPlayer2.Player.xml src/mpris2/mpris2.h mpris::Mpris2 mpris2_player Mpris2Player) - qt_add_dbus_adaptor(SOURCES src/mpris2/org.mpris.MediaPlayer2.TrackList.xml src/mpris2/mpris2.h mpris::Mpris2 mpris2_tracklist Mpris2TrackList) - qt_add_dbus_adaptor(SOURCES src/mpris2/org.mpris.MediaPlayer2.Playlists.xml src/mpris2/mpris2.h mpris::Mpris2 mpris2_playlists Mpris2Playlists) -endif() - -optional_source(HAVE_MOODBAR - SOURCES - src/moodbar/moodbarbuilder.cpp - src/moodbar/moodbarcontroller.cpp - src/moodbar/moodbaritemdelegate.cpp - src/moodbar/moodbarloader.cpp - src/moodbar/moodbarpipeline.cpp - src/moodbar/moodbarproxystyle.cpp - src/moodbar/moodbarrenderer.cpp - src/engine/gstfastspectrumplugin.cpp - src/engine/gstfastspectrum.cpp - src/settings/moodbarsettingspage.cpp - HEADERS - src/moodbar/moodbarcontroller.h - src/moodbar/moodbaritemdelegate.h - src/moodbar/moodbarloader.h - src/moodbar/moodbarpipeline.h - src/moodbar/moodbarproxystyle.h - src/settings/moodbarsettingspage.h - UI - src/settings/moodbarsettingspage.ui -) - -if(UNIX) - optional_source(HAVE_GIO SOURCES src/device/giolister.cpp HEADERS src/device/giolister.h) -endif() - -if(HAVE_UDISKS2) - optional_source(HAVE_UDISKS2 SOURCES src/device/udisks2lister.cpp HEADERS src/device/udisks2lister.h) - set_source_files_properties(src/device/org.freedesktop.DBus.ObjectManager.xml PROPERTIES NO_NAMESPACE objectmanager INCLUDE includes/dbus_metatypes.h) - set_source_files_properties(src/device/org.freedesktop.UDisks2.Filesystem.xml PROPERTIES NO_NAMESPACE udisks2filesystem INCLUDE includes/dbus_metatypes.h) - set_source_files_properties(src/device/org.freedesktop.UDisks2.Block.xml PROPERTIES NO_NAMESPACE udisks2block INCLUDE includes/dbus_metatypes.h) - set_source_files_properties(src/device/org.freedesktop.UDisks2.Drive.xml PROPERTIES NO_NAMESPACE udisks2drive INCLUDE includes/dbus_metatypes.h) - set_source_files_properties(src/device/org.freedesktop.UDisks2.Job.xml PROPERTIES NO_NAMESPACE udisks2job INCLUDE includes/dbus_metatypes.h) - qt_add_dbus_interface(SOURCES src/device/org.freedesktop.DBus.ObjectManager.xml objectmanager) - qt_add_dbus_interface(SOURCES src/device/org.freedesktop.UDisks2.Filesystem.xml udisks2filesystem) - qt_add_dbus_interface(SOURCES src/device/org.freedesktop.UDisks2.Block.xml udisks2block) - qt_add_dbus_interface(SOURCES src/device/org.freedesktop.UDisks2.Drive.xml udisks2drive) - qt_add_dbus_interface(SOURCES src/device/org.freedesktop.UDisks2.Job.xml udisks2job) -endif() - -optional_source(HAVE_MTP - SOURCES - src/device/mtpconnection.cpp - src/device/mtpdevice.cpp - src/device/mtploader.cpp - HEADERS - src/device/mtpconnection.h - src/device/mtpdevice.h - src/device/mtploader.h -) - -optional_source(HAVE_AUDIOCD - SOURCES - src/device/cddadevice.cpp - src/device/cddalister.cpp - src/device/cddasongloader.cpp - HEADERS - src/device/cddadevice.h - src/device/cddalister.h - src/device/cddasongloader.h -) - -optional_source(HAVE_GPOD - SOURCES - src/device/gpoddevice.cpp - src/device/gpodloader.cpp - HEADERS - src/device/gpoddevice.h - src/device/gpodloader.h -) - -optional_source(HAVE_SUBSONIC - SOURCES - src/subsonic/subsonicservice.cpp - src/subsonic/subsonicurlhandler.cpp - src/subsonic/subsonicbaserequest.cpp - src/subsonic/subsonicrequest.cpp - src/subsonic/subsonicscrobblerequest.cpp - src/settings/subsonicsettingspage.cpp - src/scrobbler/subsonicscrobbler.cpp - HEADERS - src/subsonic/subsonicservice.h - src/subsonic/subsonicurlhandler.h - src/subsonic/subsonicbaserequest.h - src/subsonic/subsonicrequest.h - src/subsonic/subsonicscrobblerequest.h - src/settings/subsonicsettingspage.h - src/scrobbler/subsonicscrobbler.h - UI - src/settings/subsonicsettingspage.ui -) - -optional_source(HAVE_TIDAL - SOURCES - src/tidal/tidalservice.cpp - src/tidal/tidalurlhandler.cpp - src/tidal/tidalbaserequest.cpp - src/tidal/tidalrequest.cpp - src/tidal/tidalstreamurlrequest.cpp - src/tidal/tidalfavoriterequest.cpp - src/settings/tidalsettingspage.cpp - src/covermanager/tidalcoverprovider.cpp - HEADERS - src/tidal/tidalservice.h - src/tidal/tidalurlhandler.h - src/tidal/tidalbaserequest.h - src/tidal/tidalrequest.h - src/tidal/tidalstreamurlrequest.h - src/tidal/tidalfavoriterequest.h - src/settings/tidalsettingspage.h - src/covermanager/tidalcoverprovider.h - UI - src/settings/tidalsettingspage.ui -) - -optional_source(HAVE_SPOTIFY - SOURCES - src/spotify/spotifyservice.cpp - src/spotify/spotifybaserequest.cpp - src/spotify/spotifyrequest.cpp - src/spotify/spotifyfavoriterequest.cpp - src/settings/spotifysettingspage.cpp - src/covermanager/spotifycoverprovider.cpp - HEADERS - src/spotify/spotifyservice.h - src/spotify/spotifybaserequest.h - src/spotify/spotifyrequest.h - src/spotify/spotifyfavoriterequest.h - src/settings/spotifysettingspage.h - src/covermanager/spotifycoverprovider.h - UI - src/settings/spotifysettingspage.ui -) - -optional_source(HAVE_QOBUZ - SOURCES - src/qobuz/qobuzservice.cpp - src/qobuz/qobuzurlhandler.cpp - src/qobuz/qobuzbaserequest.cpp - src/qobuz/qobuzrequest.cpp - src/qobuz/qobuzstreamurlrequest.cpp - src/qobuz/qobuzfavoriterequest.cpp - src/settings/qobuzsettingspage.cpp - src/covermanager/qobuzcoverprovider.cpp - HEADERS - src/qobuz/qobuzservice.h - src/qobuz/qobuzurlhandler.h - src/qobuz/qobuzbaserequest.h - src/qobuz/qobuzrequest.h - src/qobuz/qobuzstreamurlrequest.h - src/qobuz/qobuzfavoriterequest.h - src/settings/qobuzsettingspage.h - src/covermanager/qobuzcoverprovider.h - UI - src/settings/qobuzsettingspage.ui + src/main/mainwindow.ui ) qt_wrap_cpp(SOURCES ${HEADERS}) qt_wrap_ui(SOURCES ${UI}) qt_add_resources(SOURCES data/data.qrc data/icons.qrc) -add_library(strawberry_lib STATIC ${SOURCES}) - -target_sources(strawberry PRIVATE src/main.cpp) +target_sources(strawberry PRIVATE ${SOURCES}) if(WIN32) target_sources(strawberry PRIVATE windres.rc) @@ -1488,7 +441,7 @@ if(LINUX AND LSB_RELEASE_EXEC AND DPKG_BUILDPACKAGE) endif() if(HAVE_TRANSLATIONS) - qt_add_lupdate(strawberry_lib TS_FILES "${CMAKE_SOURCE_DIR}/src/translations/strawberry_en_US.ts" OPTIONS -locations none -no-ui-lines -no-obsolete) + qt_add_lupdate(strawberry TS_FILES "${CMAKE_SOURCE_DIR}/src/translations/strawberry_en_US.ts" OPTIONS -locations none -no-ui-lines -no-obsolete) file(GLOB_RECURSE ts_files ${CMAKE_SOURCE_DIR}/src/translations/*.ts) set_source_files_properties(${ts_files} PROPERTIES OUTPUT_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/data") qt_add_lrelease(strawberry TS_FILES ${ts_files} QM_FILES_OUTPUT_VARIABLE INSTALL_TRANSLATIONS_FILES) @@ -1497,7 +450,7 @@ if(HAVE_TRANSLATIONS) endif() endif() -target_include_directories(strawberry_lib PUBLIC +target_include_directories(strawberry PRIVATE ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/src @@ -1505,66 +458,86 @@ target_include_directories(strawberry_lib PUBLIC ) if(SINGLEAPPLICATION_INCLUDE_DIRS) - target_include_directories(strawberry_lib SYSTEM PUBLIC ${SINGLEAPPLICATION_INCLUDE_DIRS}) -endif() - -if(HAVE_QPA_QPLATFORMNATIVEINTERFACE_H) - target_include_directories(strawberry_lib SYSTEM PUBLIC ${Qt${QT_VERSION_MAJOR}Gui_PRIVATE_INCLUDE_DIRS}) -endif() - -target_link_libraries(strawberry_lib PUBLIC + target_include_directories(strawberry SYSTEM PRIVATE ${SINGLEAPPLICATION_INCLUDE_DIRS}) +endif() + +# if(APPLE) +# target_link_libraries(strawberry PRIVATE +# "-framework Foundation" +# "-framework AppKit" +# "-framework Carbon" +# "-framework CoreAudio" +# "-framework DiskArbitration" +# "-framework IOKit" +# "-framework ScriptingBridge" +# SPMediaKeyTap +# ) +# endif() + +target_link_libraries(strawberry PRIVATE ${CMAKE_THREAD_LIBS_INIT} + $<$:execinfo> PkgConfig::GLIB PkgConfig::GOBJECT - PkgConfig::SQLITE PkgConfig::GSTREAMER PkgConfig::GSTREAMER_BASE PkgConfig::GSTREAMER_AUDIO PkgConfig::GSTREAMER_APP PkgConfig::GSTREAMER_TAG PkgConfig::GSTREAMER_PBUTILS - ${TAGLIB_LIBRARIES} Qt${QT_VERSION_MAJOR}::Core - Qt${QT_VERSION_MAJOR}::Concurrent - Qt${QT_VERSION_MAJOR}::Gui - Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Network Qt${QT_VERSION_MAJOR}::Sql + Qt${QT_VERSION_MAJOR}::Gui + Qt${QT_VERSION_MAJOR}::Widgets $<$:Qt${QT_VERSION_MAJOR}::DBus> - ICU::uc - ICU::i18n - $<$:ALSA::ALSA> - $<$:PkgConfig::LIBPULSE> - $<$:PkgConfig::CHROMAPRINT> - $<$:PkgConfig::FFTW3> - $<$:PkgConfig::LIBEBUR128> - $<$:X11::X11_xcb> - $<$:PkgConfig::GIO> - $<$:PkgConfig::GIO_UNIX> - $<$:PkgConfig::LIBCDIO> - $<$:PkgConfig::LIBMTP> - $<$:PkgConfig::LIBGPOD PkgConfig::GDK_PIXBUF> - $<$:PkgConfig::QTSPARKLE> - $<$:execinfo> - $<$:dsound dwmapi getopt-win::getopt> - $<$:WindowsApp> ${SINGLEAPPLICATION_LIBRARIES} + $<$:PkgConfig::QTSPARKLE> + strawberry_core + strawberry_utilities + strawberry_mimedata + strawberry_osd + strawberry_tagreader + strawberry_widgets + strawberry_engine + strawberry_lyrics + strawberry_filterparser + strawberry_analyzer + strawberry_transcoder + strawberry_musicbrainz + strawberry_collection + strawberry_playlist + strawberry_playlistparsers + strawberry_equalizer + strawberry_edittagdialog + strawberry_smartplaylists + strawberry_fileview + strawberry_transcoder + strawberry_organize + strawberry_context + strawberry_moodbar + strawberry_scrobbler + strawberry_queue + strawberry_radios + strawberry_device + strawberry_settings + strawberry_providers + strawberry_player + strawberry_songloader + strawberry_systemtrayicon ) -if(APPLE) - target_link_libraries(strawberry_lib PUBLIC - "-framework Foundation" - "-framework AppKit" - "-framework Carbon" - "-framework CoreAudio" - "-framework DiskArbitration" - "-framework IOKit" - "-framework ScriptingBridge" - SPMediaKeyTap - ) +if(HAVE_MPRIS2) + target_link_libraries(strawberry PRIVATE strawberry_mpris2) endif() -target_link_libraries(strawberry PUBLIC strawberry_lib) +if(HAVE_GLOBALSHORTCUTS) + target_link_libraries(strawberry PRIVATE strawberry_globalshortcuts) +endif() + +if(APPLE) + target_link_libraries(strawberry PRIVATE strawberry_macstartup) +endif() if(NOT APPLE) install(TARGETS strawberry RUNTIME DESTINATION bin) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index e97086cc3d..9747f7a360 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,2 +1,71 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/version.h.in ${CMAKE_CURRENT_BINARY_DIR}/version.h) + +add_subdirectory(utilities) +add_subdirectory(core) +add_subdirectory(mimedata) +add_subdirectory(osd) +add_subdirectory(tagreader) +add_subdirectory(widgets) +add_subdirectory(dialogs) +add_subdirectory(engine) +add_subdirectory(lyrics) +add_subdirectory(filterparser) +add_subdirectory(analyzer) +add_subdirectory(transcoder) +add_subdirectory(collection) +add_subdirectory(playlist) +add_subdirectory(playlistparsers) +add_subdirectory(equalizer) +add_subdirectory(edittagdialog) +add_subdirectory(smartplaylists) +add_subdirectory(settings) +add_subdirectory(device) +add_subdirectory(covermanager) +add_subdirectory(fileview) +add_subdirectory(player) +add_subdirectory(radios) +add_subdirectory(streaming) +add_subdirectory(scrobbler) +add_subdirectory(organize) +add_subdirectory(context) +add_subdirectory(queue) +add_subdirectory(providers) +add_subdirectory(songloader) +add_subdirectory(systemtrayicon) + +if(HAVE_MUSICBRAINZ) + add_subdirectory(musicbrainz) +endif() + +if(HAVE_GLOBALSHORTCUTS) + add_subdirectory(globalshortcuts) +endif() + +if(HAVE_MOODBAR) + add_subdirectory(moodbar) +endif() + +if(HAVE_MPRIS2) + add_subdirectory(mpris2) +endif() + +if(HAVE_SUBSONIC) + add_subdirectory(subsonic) +endif() + +if(HAVE_TIDAL) + add_subdirectory(tidal) +endif() + +if(HAVE_SPOTIFY) + add_subdirectory(spotify) +endif() + +if(HAVE_QOBUZ) + add_subdirectory(qobuz) +endif() + +if(APPLE) + add_subdirectory(macstartup) +endif() diff --git a/src/analyzer/CMakeLists.txt b/src/analyzer/CMakeLists.txt new file mode 100644 index 0000000000..efdc62e049 --- /dev/null +++ b/src/analyzer/CMakeLists.txt @@ -0,0 +1,41 @@ +set(ANALYZER_SOURCES + fht.cpp + analyzerbase.cpp + analyzercontainer.cpp + blockanalyzer.cpp + boomanalyzer.cpp + turbineanalyzer.cpp + sonogramanalyzer.cpp + waverubberanalyzer.cpp + rainbowanalyzer.cpp +) + +set(ANALYZER_HEADERS + analyzerbase.h + analyzercontainer.h + blockanalyzer.h + boomanalyzer.h + turbineanalyzer.h + sonogramanalyzer.h + waverubberanalyzer.h + rainbowanalyzer.h +) + +qt_wrap_cpp(ANALYZER_SOURCES ${ANALYZER_HEADERS}) + +add_library(strawberry_analyzer STATIC ${ANALYZER_SOURCES}) + +target_include_directories(strawberry_analyzer PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/src + ${CMAKE_BINARY_DIR}/src +) + +target_link_libraries(strawberry_analyzer PRIVATE + Qt${QT_VERSION_MAJOR}::Core + Qt${QT_VERSION_MAJOR}::Gui + Qt${QT_VERSION_MAJOR}::Widgets + strawberry_core + strawberry_engine +) diff --git a/src/collection/CMakeLists.txt b/src/collection/CMakeLists.txt new file mode 100644 index 0000000000..9288777777 --- /dev/null +++ b/src/collection/CMakeLists.txt @@ -0,0 +1,82 @@ +set(COLLECTION_SOURCES + collectionlibrary.cpp + collectionmodel.cpp + collectionbackend.cpp + collectionwatcher.cpp + collectionview.cpp + collectionitemdelegate.cpp + collectionviewcontainer.cpp + collectiondirectorymodel.cpp + collectionfilteroptions.cpp + collectionfilterwidget.cpp + collectionfilter.cpp + collectionplaylistitem.cpp + collectionquery.cpp + savedgroupingmanager.cpp + groupbydialog.cpp + collectiontask.cpp + collectionmodelupdate.cpp + collectionitem.cpp +) + +set(COLLECTION_HEADERS + collectionlibrary.h + collectionmodel.h + collectionbackend.h + collectionwatcher.h + collectionview.h + collectionitemdelegate.h + collectionviewcontainer.h + collectiondirectorymodel.h + collectionfilterwidget.h + collectionfilter.h + savedgroupingmanager.h + groupbydialog.h +) + +set(COLLECTION_UI + groupbydialog.ui + collectionfilterwidget.ui + collectionviewcontainer.ui + savedgroupingmanager.ui +) + +qt_wrap_cpp(COLLECTION_SOURCES ${COLLECTION_HEADERS}) +qt_wrap_ui(COLLECTION_SOURCES ${COLLECTION_UI}) + +add_library(strawberry_collection STATIC ${COLLECTION_SOURCES}) + +target_include_directories(strawberry_collection PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/src + ${CMAKE_BINARY_DIR}/src +) + +target_link_libraries(strawberry_collection PRIVATE + PkgConfig::GLIB + PkgConfig::GOBJECT + PkgConfig::GSTREAMER + PkgConfig::GSTREAMER_BASE + PkgConfig::GSTREAMER_AUDIO + PkgConfig::GSTREAMER_APP + PkgConfig::GSTREAMER_TAG + PkgConfig::GSTREAMER_PBUTILS + Qt${QT_VERSION_MAJOR}::Core + Qt${QT_VERSION_MAJOR}::Concurrent + Qt${QT_VERSION_MAJOR}::Network + Qt${QT_VERSION_MAJOR}::Sql + Qt${QT_VERSION_MAJOR}::Gui + Qt${QT_VERSION_MAJOR}::Widgets + strawberry_utilities + strawberry_core + strawberry_mimedata + strawberry_engine + strawberry_tagreader + strawberry_covermanager + strawberry_filterparser + strawberry_dialogs + strawberry_edittagdialog + strawberry_organize + strawberry_playlistparsers +) diff --git a/src/collection/collectionfilter.cpp b/src/collection/collectionfilter.cpp index 910ed8fa41..3294772332 100644 --- a/src/collection/collectionfilter.cpp +++ b/src/collection/collectionfilter.cpp @@ -28,7 +28,7 @@ #include #include "core/song.h" -#include "core/songmimedata.h" +#include "mimedata/songmimedata.h" #include "filterparser/filterparser.h" #include "filterparser/filtertree.h" #include "collectionbackend.h" diff --git a/src/collection/collectionfilterwidget.cpp b/src/collection/collectionfilterwidget.cpp index 78030e5941..e124f2e418 100644 --- a/src/collection/collectionfilterwidget.cpp +++ b/src/collection/collectionfilterwidget.cpp @@ -53,7 +53,7 @@ #include "savedgroupingmanager.h" #include "collectionfilterwidget.h" #include "groupbydialog.h" -#include "ui_collectionfilterwidget.h" +#include "collection/ui_collectionfilterwidget.h" #include "widgets/searchfield.h" #include "constants/collectionsettings.h" #include "constants/appearancesettings.h" diff --git a/src/collection/collectionmodel.cpp b/src/collection/collectionmodel.cpp index a1e112bade..dd84b0eeb2 100644 --- a/src/collection/collectionmodel.cpp +++ b/src/collection/collectionmodel.cpp @@ -59,7 +59,7 @@ #include "core/iconloader.h" #include "core/logging.h" #include "core/settings.h" -#include "core/songmimedata.h" +#include "mimedata/songmimedata.h" #include "collectionfilteroptions.h" #include "collectionquery.h" #include "collectionbackend.h" diff --git a/src/collection/collectionview.cpp b/src/collection/collectionview.cpp index 0ec170ad61..1a2705c274 100644 --- a/src/collection/collectionview.cpp +++ b/src/collection/collectionview.cpp @@ -51,7 +51,7 @@ #include #include "core/iconloader.h" -#include "core/mimedata.h" +#include "mimedata/mimedata.h" #include "core/musicstorage.h" #include "core/deletefiles.h" #include "core/settings.h" @@ -69,7 +69,7 @@ # include "device/devicemanager.h" # include "device/devicestatefiltermodel.h" #endif -#include "dialogs/edittagdialog.h" +#include "edittagdialog/edittagdialog.h" #include "dialogs/deleteconfirmationdialog.h" #include "organize/organizedialog.h" #include "organize/organizeerrordialog.h" diff --git a/src/collection/collectionviewcontainer.cpp b/src/collection/collectionviewcontainer.cpp index 0d467060a7..97e58e225d 100644 --- a/src/collection/collectionviewcontainer.cpp +++ b/src/collection/collectionviewcontainer.cpp @@ -26,7 +26,7 @@ #include "collectionfilterwidget.h" #include "collectionview.h" #include "collectionviewcontainer.h" -#include "ui_collectionviewcontainer.h" +#include "collection/ui_collectionviewcontainer.h" CollectionViewContainer::CollectionViewContainer(QWidget *parent) : QWidget(parent), ui_(new Ui_CollectionViewContainer) { diff --git a/src/context/CMakeLists.txt b/src/context/CMakeLists.txt new file mode 100644 index 0000000000..a7c761590a --- /dev/null +++ b/src/context/CMakeLists.txt @@ -0,0 +1,32 @@ +set(CONTEXT_SOURCES + contextview.cpp + contextalbum.cpp +) + +set(CONTEXT_HEADERS + contextview.h + contextalbum.h +) + +qt_wrap_cpp(CONTEXT_SOURCES ${CONTEXT_HEADERS}) + +add_library(strawberry_context STATIC ${CONTEXT_SOURCES}) + +target_include_directories(strawberry_context PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/src + ${CMAKE_BINARY_DIR}/src +) + +target_link_libraries(strawberry_context PRIVATE + Qt${QT_VERSION_MAJOR}::Core + Qt${QT_VERSION_MAJOR}::Network + Qt${QT_VERSION_MAJOR}::Widgets + strawberry_utilities + strawberry_core + strawberry_collection + strawberry_covermanager + strawberry_lyrics + strawberry_widgets +) diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt new file mode 100644 index 0000000000..d3b8d4b235 --- /dev/null +++ b/src/core/CMakeLists.txt @@ -0,0 +1,95 @@ +set(CORE_SOURCES + logging.cpp + commandlineoptions.cpp + database.cpp + memorydatabase.cpp + sqlquery.cpp + sqlrow.cpp + deletefiles.cpp + filesystemmusicstorage.cpp + filesystemwatcherinterface.cpp + mergedproxymodel.cpp + multisortfilterproxy.cpp + musicstorage.cpp + networkaccessmanager.cpp + threadsafenetworkdiskcache.cpp + networktimeouts.cpp + networkproxyfactory.cpp + qtfslistener.cpp + settings.cpp + settingsprovider.cpp + signalchecker.cpp + song.cpp + stylehelper.cpp + stylesheetloader.cpp + taskmanager.cpp + thread.cpp + urlhandlers.cpp + urlhandler.cpp + iconloader.cpp + standarditemiconloader.cpp + scopedtransaction.cpp + localredirectserver.cpp + temporaryfile.cpp + enginemetadata.cpp + platforminterface.cpp +) + +set(CORE_HEADERS + logging.h + database.h + memorydatabase.h + deletefiles.h + filesystemwatcherinterface.h + mergedproxymodel.h + multisortfilterproxy.h + networkaccessmanager.h + threadsafenetworkdiskcache.h + networktimeouts.h + qtfslistener.h + settings.h + taskmanager.h + thread.h + urlhandlers.h + urlhandler.h + standarditemiconloader.h + stylesheetloader.h + localredirectserver.h +) + +if(APPLE) + list(APPEND CORE_SOURCES scoped_nsautorelease_pool.mm) +endif() + +if(WIN32) + list(APPEND CORE_SOURCES windows7thumbbar.cpp) + list(APPEND CORE_HEADERS windows7thumbbar.h) +endif() + +qt_wrap_cpp(CORE_SOURCES ${CORE_HEADERS}) + +add_library(strawberry_core STATIC ${CORE_SOURCES}) + +target_include_directories(strawberry_core PRIVATE + ${CMAKE_SOURCE_DIR} + ${CMAKE_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/src + ${CMAKE_BINARY_DIR}/src +) + +target_link_libraries(strawberry_core PRIVATE + PkgConfig::GLIB + PkgConfig::GOBJECT + PkgConfig::SQLITE + ${TAGLIB_LIBRARIES} + Qt${QT_VERSION_MAJOR}::Core + Qt${QT_VERSION_MAJOR}::Concurrent + Qt${QT_VERSION_MAJOR}::Network + Qt${QT_VERSION_MAJOR}::Sql + $<$:Qt${QT_VERSION_MAJOR}::DBus> + Qt${QT_VERSION_MAJOR}::Gui + Qt${QT_VERSION_MAJOR}::Widgets + $<$:PkgConfig::LIBGPOD PkgConfig::GDK_PIXBUF> + $<$:getopt-win::getopt> + strawberry_utilities +) diff --git a/src/covermanager/CMakeLists.txt b/src/covermanager/CMakeLists.txt new file mode 100644 index 0000000000..f902a02283 --- /dev/null +++ b/src/covermanager/CMakeLists.txt @@ -0,0 +1,119 @@ +set(COVERMANAGER_SOURCES + albumcovermanager.cpp + albumcovermanagerlist.cpp + albumcoverloader.cpp + albumcoverloaderoptions.cpp + albumcoverfetcher.cpp + albumcoverfetchersearch.cpp + albumcoversearcher.cpp + albumcoverexport.cpp + albumcoverexporter.cpp + albumcoverchoicecontroller.cpp + coverprovider.cpp + coverproviders.cpp + coversearchstatistics.cpp + coversearchstatisticsdialog.cpp + coverexportrunnable.cpp + currentalbumcoverloader.cpp + coverfromurldialog.cpp + jsoncoverprovider.cpp + lastfmcoverprovider.cpp + musicbrainzcoverprovider.cpp + discogscoverprovider.cpp + deezercoverprovider.cpp + musixmatchcoverprovider.cpp + opentidalcoverprovider.cpp +) + +set(COVERMANAGER_HEADERS + albumcovermanager.h + albumcovermanagerlist.h + albumcoverloader.h + albumcoverfetcher.h + albumcoverfetchersearch.h + albumcoversearcher.h + albumcoverexport.h + albumcoverexporter.h + albumcoverchoicecontroller.h + coverprovider.h + coverproviders.h + coversearchstatisticsdialog.h + coverexportrunnable.h + currentalbumcoverloader.h + coverfromurldialog.h + jsoncoverprovider.h + lastfmcoverprovider.h + musicbrainzcoverprovider.h + discogscoverprovider.h + deezercoverprovider.h + musixmatchcoverprovider.h + opentidalcoverprovider.h +) + +set(COVERMANAGER_UI + albumcoverexport.ui + albumcovermanager.ui + albumcoversearcher.ui + coversearchstatisticsdialog.ui + coverfromurldialog.ui +) + +if(HAVE_TIDAL) + list(APPEND COVERMANAGER_SOURCES tidalcoverprovider.cpp) + list(APPEND COVERMANAGER_HEADERS tidalcoverprovider.h) +endif() + +if(HAVE_SPOTIFY) + list(APPEND COVERMANAGER_SOURCES spotifycoverprovider.cpp) + list(APPEND COVERMANAGER_HEADERS spotifycoverprovider.h) +endif() + +if(HAVE_QOBUZ) + list(APPEND COVERMANAGER_SOURCES qobuzcoverprovider.cpp) + list(APPEND COVERMANAGER_HEADERS qobuzcoverprovider.h) +endif() + +qt_wrap_cpp(COVERMANAGER_SOURCES ${COVERMANAGER_HEADERS}) +qt_wrap_ui(COVERMANAGER_SOURCES ${COVERMANAGER_UI}) + +add_library(strawberry_covermanager STATIC ${COVERMANAGER_SOURCES}) + +target_include_directories(strawberry_covermanager PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/src + ${CMAKE_BINARY_DIR}/src +) + +target_link_libraries(strawberry_covermanager PRIVATE + PkgConfig::GLIB + PkgConfig::GOBJECT + Qt${QT_VERSION_MAJOR}::Core + Qt${QT_VERSION_MAJOR}::Concurrent + Qt${QT_VERSION_MAJOR}::Network + Qt${QT_VERSION_MAJOR}::Sql + Qt${QT_VERSION_MAJOR}::Gui + Qt${QT_VERSION_MAJOR}::Widgets + strawberry_utilities + strawberry_core + strawberry_tagreader + strawberry_collection + strawberry_streaming + strawberry_widgets +) + +if(HAVE_SUBSONIC) + target_link_libraries(strawberry_covermanager PRIVATE strawberry_subsonic) +endif() + +if(HAVE_TIDAL) + target_link_libraries(strawberry_covermanager PRIVATE strawberry_tidal) +endif() + +if(HAVE_SPOTIFY) + target_link_libraries(strawberry_covermanager PRIVATE strawberry_spotify) +endif() + +if(HAVE_QOBUZ) + target_link_libraries(strawberry_covermanager PRIVATE strawberry_qobuz) +endif() diff --git a/src/covermanager/albumcovermanager.cpp b/src/covermanager/albumcovermanager.cpp index 7abbccdf06..2dd24e2c59 100644 --- a/src/covermanager/albumcovermanager.cpp +++ b/src/covermanager/albumcovermanager.cpp @@ -68,7 +68,7 @@ #include "core/settings.h" #include "core/database.h" #include "core/networkaccessmanager.h" -#include "core/songmimedata.h" +#include "mimedata/songmimedata.h" #include "utilities/strutils.h" #include "utilities/fileutils.h" #include "utilities/imageutils.h" diff --git a/src/covermanager/albumcovermanagerlist.cpp b/src/covermanager/albumcovermanagerlist.cpp index e590a047eb..34a031815a 100644 --- a/src/covermanager/albumcovermanagerlist.cpp +++ b/src/covermanager/albumcovermanagerlist.cpp @@ -35,7 +35,7 @@ #include "includes/scoped_ptr.h" #include "core/song.h" -#include "core/songmimedata.h" +#include "mimedata/songmimedata.h" #include "collection/collectionbackend.h" #include "albumcovermanager.h" #include "albumcovermanagerlist.h" diff --git a/src/device/CMakeLists.txt b/src/device/CMakeLists.txt new file mode 100644 index 0000000000..ad862c5182 --- /dev/null +++ b/src/device/CMakeLists.txt @@ -0,0 +1,115 @@ +set(DEVICE_SOURCES + connecteddevice.cpp + devicedatabasebackend.cpp + devicelister.cpp + devicemanager.cpp + devicestatefiltermodel.cpp + filesystemdevice.cpp + deviceviewcontainer.cpp + deviceview.cpp + deviceproperties.cpp + deviceinfo.cpp +) + +set(DEVICE_HEADERS + connecteddevice.h + devicedatabasebackend.h + devicelister.h + devicemanager.h + devicestatefiltermodel.h + filesystemdevice.h + deviceviewcontainer.h + deviceview.h + deviceproperties.h +) + +set(DEVICE_UI + deviceproperties.ui + deviceviewcontainer.ui +) + +if(APPLE) + list(APPEND DEVICE_SOURCES macosdevicelister.mm) + list(APPEND DEVICE_HEADERS macosdevicelister.h) +endif() + +if(UNIX) + list(APPEND DEVICE_SOURCES giolister.cpp) + list(APPEND DEVICE_HEADERS giolister.h) +endif() + +if(HAVE_UDISKS2) + list(APPEND DEVICE_SOURCES udisks2lister.cpp) + list(APPEND DEVICE_HEADERS udisks2lister.h) + set_source_files_properties(org.freedesktop.DBus.ObjectManager.xml PROPERTIES NO_NAMESPACE objectmanager INCLUDE includes/dbus_metatypes.h) + set_source_files_properties(org.freedesktop.UDisks2.Filesystem.xml PROPERTIES NO_NAMESPACE udisks2filesystem INCLUDE includes/dbus_metatypes.h) + set_source_files_properties(org.freedesktop.UDisks2.Block.xml PROPERTIES NO_NAMESPACE udisks2block INCLUDE includes/dbus_metatypes.h) + set_source_files_properties(org.freedesktop.UDisks2.Drive.xml PROPERTIES NO_NAMESPACE udisks2drive INCLUDE includes/dbus_metatypes.h) + set_source_files_properties(org.freedesktop.UDisks2.Job.xml PROPERTIES NO_NAMESPACE udisks2job INCLUDE includes/dbus_metatypes.h) + qt_add_dbus_interface(DEVICE_SOURCES org.freedesktop.DBus.ObjectManager.xml objectmanager) + qt_add_dbus_interface(DEVICE_SOURCES org.freedesktop.UDisks2.Filesystem.xml udisks2filesystem) + qt_add_dbus_interface(DEVICE_SOURCES org.freedesktop.UDisks2.Block.xml udisks2block) + qt_add_dbus_interface(DEVICE_SOURCES org.freedesktop.UDisks2.Drive.xml udisks2drive) + qt_add_dbus_interface(DEVICE_SOURCES org.freedesktop.UDisks2.Job.xml udisks2job) +endif() + +if(HAVE_MTP) + list(APPEND DEVICE_SOURCES mtpconnection.cpp mtpdevice.cpp mtploader.cpp) + list(APPEND DEVICE_HEADERS mtpconnection.h mtpdevice.h mtploader.h) +endif() + +if(HAVE_AUDIOCD) + list(APPEND DEVICE_SOURCES cddadevice.cpp cddalister.cpp cddasongloader.cpp) + list(APPEND DEVICE_HEADERS cddadevice.h cddalister.h cddasongloader.h) +endif() + +if(HAVE_GPOD) + list(APPEND DEVICE_SOURCES gpoddevice.cpp gpodloader.cpp) + list(APPEND DEVICE_HEADERS gpoddevice.h gpodloader.h) +endif() + +qt_wrap_cpp(DEVICE_SOURCES ${DEVICE_HEADERS}) +qt_wrap_ui(DEVICE_SOURCES ${DEVICE_UI}) + +add_library(strawberry_device STATIC ${DEVICE_SOURCES}) + +target_include_directories(strawberry_device PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/src + ${CMAKE_BINARY_DIR}/src +) + +target_link_libraries(strawberry_device PRIVATE + PkgConfig::GLIB + PkgConfig::GOBJECT + PkgConfig::GSTREAMER + PkgConfig::GSTREAMER_BASE + PkgConfig::GSTREAMER_AUDIO + PkgConfig::GSTREAMER_APP + PkgConfig::GSTREAMER_TAG + PkgConfig::GSTREAMER_PBUTILS + $<$:PkgConfig::GIO> + $<$:PkgConfig::GIO_UNIX> + $<$:PkgConfig::LIBCDIO> + $<$:PkgConfig::LIBMTP> + $<$:PkgConfig::LIBGPOD PkgConfig::GDK_PIXBUF> + Qt${QT_VERSION_MAJOR}::Core + Qt${QT_VERSION_MAJOR}::Concurrent + Qt${QT_VERSION_MAJOR}::Network + Qt${QT_VERSION_MAJOR}::Sql + $<$:Qt${QT_VERSION_MAJOR}::DBus> + Qt${QT_VERSION_MAJOR}::Widgets + strawberry_utilities + strawberry_core + strawberry_collection + strawberry_widgets + strawberry_musicbrainz +) + +if(APPLE) + target_link_libraries(strawberry_device PRIVATE + "-framework IOKit" + "-framework DiskArbitration" + ) +endif() diff --git a/src/device/deviceview.cpp b/src/device/deviceview.cpp index db98476350..ca4cbb095c 100644 --- a/src/device/deviceview.cpp +++ b/src/device/deviceview.cpp @@ -53,7 +53,7 @@ #include "core/iconloader.h" #include "core/deletefiles.h" #include "core/mergedproxymodel.h" -#include "core/mimedata.h" +#include "mimedata/mimedata.h" #include "core/musicstorage.h" #include "utilities/colorutils.h" #include "organize/organizedialog.h" diff --git a/src/dialogs/CMakeLists.txt b/src/dialogs/CMakeLists.txt new file mode 100644 index 0000000000..240604b94f --- /dev/null +++ b/src/dialogs/CMakeLists.txt @@ -0,0 +1,59 @@ +set(DIALOGS_SOURCES + about.cpp + console.cpp + errordialog.cpp + addstreamdialog.cpp + userpassdialog.cpp + deleteconfirmationdialog.cpp + lastfmimportdialog.cpp + messagedialog.cpp + snapdialog.cpp + saveplaylistsdialog.cpp +) + +set(DIALOGS_HEADERS + about.h + errordialog.h + console.h + addstreamdialog.h + userpassdialog.h + deleteconfirmationdialog.h + lastfmimportdialog.h + messagedialog.h + snapdialog.h + saveplaylistsdialog.h +) + +set(DIALOGS_UI + about.ui + errordialog.ui + console.ui + addstreamdialog.ui + userpassdialog.ui + lastfmimportdialog.ui + messagedialog.ui + saveplaylistsdialog.ui +) + +qt_wrap_cpp(DIALOGS_SOURCES ${DIALOGS_HEADERS}) +qt_wrap_ui(DIALOGS_SOURCES ${DIALOGS_UI}) + +add_library(strawberry_dialogs STATIC ${DIALOGS_SOURCES}) + +target_include_directories(strawberry_dialogs PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/src + ${CMAKE_BINARY_DIR}/src +) + +target_link_libraries(strawberry_dialogs PRIVATE + PkgConfig::GLIB + PkgConfig::GOBJECT + Qt${QT_VERSION_MAJOR}::Core + Qt${QT_VERSION_MAJOR}::Sql + Qt${QT_VERSION_MAJOR}::Gui + Qt${QT_VERSION_MAJOR}::Widgets + strawberry_utilities + strawberry_core +) diff --git a/src/dialogs/about.h b/src/dialogs/about.h index dc7e734a73..b8fb9a9682 100644 --- a/src/dialogs/about.h +++ b/src/dialogs/about.h @@ -29,7 +29,7 @@ #include #include -#include "ui_about.h" +#include "dialogs/ui_about.h" class QWidget; diff --git a/src/dialogs/addstreamdialog.h b/src/dialogs/addstreamdialog.h index a7ed9609ae..79bf136680 100644 --- a/src/dialogs/addstreamdialog.h +++ b/src/dialogs/addstreamdialog.h @@ -25,7 +25,7 @@ #include #include -#include "ui_addstreamdialog.h" +#include "dialogs/ui_addstreamdialog.h" class AddStreamDialog : public QDialog { Q_OBJECT diff --git a/src/dialogs/console.h b/src/dialogs/console.h index 303c0d4f20..b77853ad91 100644 --- a/src/dialogs/console.h +++ b/src/dialogs/console.h @@ -29,7 +29,7 @@ #include #include -#include "ui_console.h" +#include "dialogs/ui_console.h" #include "includes/shared_ptr.h" diff --git a/src/dialogs/lastfmimportdialog.h b/src/dialogs/lastfmimportdialog.h index cc1a822c55..331c21bccb 100644 --- a/src/dialogs/lastfmimportdialog.h +++ b/src/dialogs/lastfmimportdialog.h @@ -28,7 +28,7 @@ #include "includes/shared_ptr.h" -#include "ui_lastfmimportdialog.h" +#include "dialogs/ui_lastfmimportdialog.h" class QCloseEvent; class LastFMImport; diff --git a/src/dialogs/saveplaylistsdialog.h b/src/dialogs/saveplaylistsdialog.h index 380257acbe..4584ca6398 100644 --- a/src/dialogs/saveplaylistsdialog.h +++ b/src/dialogs/saveplaylistsdialog.h @@ -25,7 +25,7 @@ #include #include -#include "ui_saveplaylistsdialog.h" +#include "dialogs/ui_saveplaylistsdialog.h" class SavePlaylistsDialog : public QDialog { Q_OBJECT diff --git a/src/edittagdialog/CMakeLists.txt b/src/edittagdialog/CMakeLists.txt new file mode 100644 index 0000000000..78115e29f9 --- /dev/null +++ b/src/edittagdialog/CMakeLists.txt @@ -0,0 +1,44 @@ +set(EDITTAGDIALOG_SOURCES + edittagdialog.cpp + trackselectiondialog.cpp +) + +set(EDITTAGDIALOG_HEADERS + edittagdialog.h + trackselectiondialog.h +) + +set(EDITTAGDIALOG_UI + edittagdialog.ui + trackselectiondialog.ui +) + +qt_wrap_cpp(EDITTAGDIALOG_SOURCES ${EDITTAGDIALOG_HEADERS}) +qt_wrap_ui(EDITTAGDIALOG_SOURCES ${EDITTAGDIALOG_UI}) + +add_library(strawberry_edittagdialog STATIC ${EDITTAGDIALOG_SOURCES}) + +target_include_directories(strawberry_edittagdialog PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/src + ${CMAKE_BINARY_DIR}/src +) + +target_link_libraries(strawberry_edittagdialog PRIVATE + PkgConfig::GLIB + PkgConfig::GOBJECT + Qt${QT_VERSION_MAJOR}::Core + Qt${QT_VERSION_MAJOR}::Concurrent + Qt${QT_VERSION_MAJOR}::Network + Qt${QT_VERSION_MAJOR}::Sql + Qt${QT_VERSION_MAJOR}::Gui + Qt${QT_VERSION_MAJOR}::Widgets + strawberry_core + strawberry_utilities + strawberry_tagreader + strawberry_covermanager + strawberry_widgets + strawberry_collection + strawberry_lyrics +) diff --git a/src/dialogs/edittagdialog.cpp b/src/edittagdialog/edittagdialog.cpp similarity index 100% rename from src/dialogs/edittagdialog.cpp rename to src/edittagdialog/edittagdialog.cpp diff --git a/src/dialogs/edittagdialog.h b/src/edittagdialog/edittagdialog.h similarity index 100% rename from src/dialogs/edittagdialog.h rename to src/edittagdialog/edittagdialog.h diff --git a/src/dialogs/edittagdialog.ui b/src/edittagdialog/edittagdialog.ui similarity index 100% rename from src/dialogs/edittagdialog.ui rename to src/edittagdialog/edittagdialog.ui diff --git a/src/dialogs/trackselectiondialog.cpp b/src/edittagdialog/trackselectiondialog.cpp similarity index 100% rename from src/dialogs/trackselectiondialog.cpp rename to src/edittagdialog/trackselectiondialog.cpp diff --git a/src/dialogs/trackselectiondialog.h b/src/edittagdialog/trackselectiondialog.h similarity index 100% rename from src/dialogs/trackselectiondialog.h rename to src/edittagdialog/trackselectiondialog.h diff --git a/src/dialogs/trackselectiondialog.ui b/src/edittagdialog/trackselectiondialog.ui similarity index 100% rename from src/dialogs/trackselectiondialog.ui rename to src/edittagdialog/trackselectiondialog.ui diff --git a/src/engine/CMakeLists.txt b/src/engine/CMakeLists.txt new file mode 100644 index 0000000000..7e3e860184 --- /dev/null +++ b/src/engine/CMakeLists.txt @@ -0,0 +1,89 @@ +set(ENGINE_SOURCES + enginebase.cpp + enginedevice.cpp + devicefinders.cpp + devicefinder.cpp + gststartup.cpp + gstengine.cpp + gstenginepipeline.cpp +) + +set(ENGINE_HEADERS + enginebase.h + devicefinders.h + gststartup.h + gstengine.h + gstenginepipeline.h +) + +if(HAVE_ALSA) + list(APPEND ENGINE_SOURCES alsadevicefinder.cpp alsapcmdevicefinder.cpp) +endif() + +if(HAVE_PULSE) + list(APPEND ENGINE_SOURCES pulsedevicefinder.cpp) +endif() + +if(MSVC) + list(APPEND ENGINE_SOURCES uwpdevicefinder.cpp asiodevicefinder.cpp) +endif() + +if(HAVE_SONGFINGERPRINTING OR HAVE_MUSICBRAINZ) + list(APPEND ENGINE_SOURCES chromaprinter.cpp) +endif() + +if(HAVE_EBUR128) + list(APPEND ENGINE_SOURCES ebur128analysis.cpp) +endif() + +if(HAVE_MOODBAR) + list(APPEND ENGINE_SOURCES gstfastspectrumplugin.cpp gstfastspectrum.cpp) +endif() + +if(APPLE) + list(APPEND ENGINE_SOURCES macosdevicefinder.cpp) +endif() + +if(WIN32) + list(APPEND ENGINE_SOURCES directsounddevicefinder.cpp mmdevicefinder.cpp) +endif() + +qt_wrap_cpp(ENGINE_SOURCES ${ENGINE_HEADERS}) + +add_library(strawberry_engine STATIC ${ENGINE_SOURCES}) + +target_include_directories(strawberry_engine PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/src + ${CMAKE_BINARY_DIR}/src +) + +target_link_libraries(strawberry_engine PRIVATE + PkgConfig::GLIB + PkgConfig::GOBJECT + $<$:ALSA::ALSA> + $<$:PkgConfig::LIBPULSE> + $<$:dsound> + $<$:WindowsApp> + PkgConfig::GSTREAMER + PkgConfig::GSTREAMER_BASE + PkgConfig::GSTREAMER_AUDIO + PkgConfig::GSTREAMER_APP + PkgConfig::GSTREAMER_TAG + PkgConfig::GSTREAMER_PBUTILS + $<$:PkgConfig::CHROMAPRINT> + $<$:PkgConfig::LIBEBUR128> + $<$:PkgConfig::FFTW3> + Qt${QT_VERSION_MAJOR}::Core + Qt${QT_VERSION_MAJOR}::Concurrent + Qt${QT_VERSION_MAJOR}::Network + Qt${QT_VERSION_MAJOR}::Gui + strawberry_core +) + +if(APPLE) + target_link_libraries(strawberry_engine PRIVATE + "-framework CoreAudio" + ) +endif() diff --git a/src/equalizer/CMakeLists.txt b/src/equalizer/CMakeLists.txt new file mode 100644 index 0000000000..6faead473c --- /dev/null +++ b/src/equalizer/CMakeLists.txt @@ -0,0 +1,36 @@ +set(EQUALIZER_SOURCES + equalizer.cpp + equalizerslider.cpp +) + +set(EQUALIZER_HEADERS + equalizer.h + equalizerslider.h +) + +set(EQUALIZER_UI + equalizer.ui + equalizerslider.ui +) + +qt_wrap_cpp(EQUALIZER_SOURCES ${EQUALIZER_HEADERS}) +qt_wrap_ui(EQUALIZER_SOURCES ${EQUALIZER_UI}) + +add_library(strawberry_equalizer STATIC ${EQUALIZER_SOURCES}) + +target_include_directories(strawberry_equalizer PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_SOURCE_DIR} + ${CMAKE_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/src + ${CMAKE_BINARY_DIR}/src +) + +target_link_libraries(strawberry_equalizer PRIVATE + Qt${QT_VERSION_MAJOR}::Core + Qt${QT_VERSION_MAJOR}::Gui + Qt${QT_VERSION_MAJOR}::Widgets + strawberry_core + strawberry_widgets +) diff --git a/src/fileview/CMakeLists.txt b/src/fileview/CMakeLists.txt new file mode 100644 index 0000000000..8b44c75419 --- /dev/null +++ b/src/fileview/CMakeLists.txt @@ -0,0 +1,35 @@ +set(FILEVIEW_SOURCES + fileview.cpp + fileviewlist.cpp +) + +set(FILEVIEW_HEADERS + fileview.h + fileviewlist.h +) + +set(FILEVIEW_UI + fileview.ui +) + +qt_wrap_cpp(FILEVIEW_SOURCES ${FILEVIEW_HEADERS}) +qt_wrap_ui(FILEVIEW_SOURCES ${FILEVIEW_UI}) + +add_library(strawberry_fileview STATIC ${FILEVIEW_SOURCES}) + +target_include_directories(strawberry_fileview PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/src + ${CMAKE_BINARY_DIR}/src +) + +target_link_libraries(strawberry_fileview PRIVATE + Qt${QT_VERSION_MAJOR}::Core + Qt${QT_VERSION_MAJOR}::Widgets + strawberry_utilities + strawberry_core + strawberry_mimedata + strawberry_dialogs + strawberry_organize +) diff --git a/src/fileview/fileview.cpp b/src/fileview/fileview.cpp index 2de5663173..9fc98d5f03 100644 --- a/src/fileview/fileview.cpp +++ b/src/fileview/fileview.cpp @@ -41,7 +41,7 @@ #include "core/filesystemmusicstorage.h" #include "core/iconloader.h" #include "core/settings.h" -#include "core/mimedata.h" +#include "mimedata/mimedata.h" #include "dialogs/deleteconfirmationdialog.h" #include "fileview.h" #include "fileviewlist.h" diff --git a/src/fileview/fileviewlist.cpp b/src/fileview/fileviewlist.cpp index ee7f368b53..17e71fb7b6 100644 --- a/src/fileview/fileviewlist.cpp +++ b/src/fileview/fileviewlist.cpp @@ -32,7 +32,7 @@ #include #include "core/iconloader.h" -#include "core/mimedata.h" +#include "mimedata/mimedata.h" #include "utilities/filemanagerutils.h" #include "fileviewlist.h" diff --git a/src/filterparser/CMakeLists.txt b/src/filterparser/CMakeLists.txt new file mode 100644 index 0000000000..2302d28843 --- /dev/null +++ b/src/filterparser/CMakeLists.txt @@ -0,0 +1,52 @@ +set(SOURCES + filterparser.cpp + filtertree.cpp + filtertreeand.cpp + filtertreecolumnterm.cpp + filtertreenop.cpp + filtertreenot.cpp + filtertreeor.cpp + filtertreeterm.cpp + filterparserfloateqcomparator.cpp + filterparserfloatgecomparator.cpp + filterparserfloatgtcomparator.cpp + filterparserfloatlecomparator.cpp + filterparserfloatltcomparator.cpp + filterparserfloatnecomparator.cpp + filterparserint64eqcomparator.cpp + filterparserint64gecomparator.cpp + filterparserint64gtcomparator.cpp + filterparserint64lecomparator.cpp + filterparserint64ltcomparator.cpp + filterparserint64necomparator.cpp + filterparserinteqcomparator.cpp + filterparserintgecomparator.cpp + filterparserintgtcomparator.cpp + filterparserintlecomparator.cpp + filterparserintltcomparator.cpp + filterparserintnecomparator.cpp + filterparsersearchtermcomparator.cpp + filterparsertextcontainscomparator.cpp + filterparsertexteqcomparator.cpp + filterparsertextnecomparator.cpp + filterparseruinteqcomparator.cpp + filterparseruintgecomparator.cpp + filterparseruintgtcomparator.cpp + filterparseruintlecomparator.cpp + filterparseruintltcomparator.cpp + filterparseruintnecomparator.cpp +) + +add_library(strawberry_filterparser STATIC ${SOURCES}) + +target_include_directories(strawberry_filterparser PRIVATE + ${CMAKE_SOURCE_DIR} + ${CMAKE_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/src + ${CMAKE_BINARY_DIR}/src +) + +target_link_libraries(strawberry_filterparser PRIVATE + Qt${QT_VERSION_MAJOR}::Core + Qt${QT_VERSION_MAJOR}::Gui +) diff --git a/src/globalshortcuts/CMakeLists.txt b/src/globalshortcuts/CMakeLists.txt new file mode 100644 index 0000000000..474c33190d --- /dev/null +++ b/src/globalshortcuts/CMakeLists.txt @@ -0,0 +1,64 @@ +set(GLOBALSHORTCUTS_SOURCES globalshortcutsmanager.cpp globalshortcutsbackend.cpp globalshortcutgrabber.cpp) +set(GLOBALSHORTCUTS_HEADERS globalshortcutsmanager.h globalshortcutsbackend.h globalshortcutgrabber.h) +set(GLOBALSHORTCUTS_UI globalshortcutgrabber.ui) + +if(HAVE_KDE_GLOBALSHORTCUTS) + list(APPEND GLOBALSHORTCUTS_SOURCES globalshortcutsbackend-kde.cpp globalshortcutsbackend-gnome.cpp globalshortcutsbackend-mate.cpp) + list(APPEND GLOBALSHORTCUTS_HEADERS globalshortcutsbackend-kde.h globalshortcutsbackend-gnome.h globalshortcutsbackend-mate.h) +endif() + +if(HAVE_X11_GLOBALSHORTCUTS) + list(APPEND GLOBALSHORTCUTS_SOURCES globalshortcutsbackend-x11.cpp globalshortcut.cpp globalshortcut-x11.cpp) + list(APPEND GLOBALSHORTCUTS_HEADERS globalshortcutsbackend-x11.h globalshortcut.h) +endif() + +if(APPLE) + list(APPEND GLOBALSHORTCUTS_SOURCES globalshortcutsbackend-macos.mm globalshortcutgrabber.mm) + list(APPEND GLOBALSHORTCUTS_HEADERS globalshortcutsbackend-macos.h globalshortcutgrabber.h) +endif() + +if(WIN32) + list(APPEND GLOBALSHORTCUTS_SOURCES globalshortcutsbackend-win.cpp globalshortcut.cpp globalshortcut-win.cpp) + list(APPEND GLOBALSHORTCUTS_HEADERS globalshortcutsbackend-win.h globalshortcut.h) +endif() + +if(HAVE_KDE_GLOBALSHORTCUTS) + qt_add_dbus_interface(GLOBALSHORTCUTS_SOURCES org.kde.KGlobalAccel.xml kglobalaccel) + qt_add_dbus_interface(GLOBALSHORTCUTS_SOURCES org.kde.KGlobalAccel.Component.xml kglobalaccelcomponent) +endif() + +if(HAVE_GNOME_GLOBALSHORTCUTS) + qt_add_dbus_interface(GLOBALSHORTCUTS_SOURCES org.gnome.SettingsDaemon.MediaKeys.xml gnomesettingsdaemon) +endif() + +if(HAVE_MATE_GLOBALSHORTCUTS) + qt_add_dbus_interface(GLOBALSHORTCUTS_SOURCES org.mate.SettingsDaemon.MediaKeys.xml matesettingsdaemon) +endif() + +qt_wrap_cpp(GLOBALSHORTCUTS_SOURCES ${GLOBALSHORTCUTS_HEADERS}) +qt_wrap_ui(GLOBALSHORTCUTS_SOURCES ${GLOBALSHORTCUTS_UI}) + +add_library(strawberry_globalshortcuts STATIC ${GLOBALSHORTCUTS_SOURCES}) + +target_include_directories(strawberry_globalshortcuts PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/src + ${CMAKE_BINARY_DIR}/src +) + +target_link_libraries(strawberry_globalshortcuts PRIVATE + $<$:X11::X11_xcb> + Qt${QT_VERSION_MAJOR}::Core + Qt${QT_VERSION_MAJOR}::Gui + Qt${QT_VERSION_MAJOR}::Widgets + $<$:Qt${QT_VERSION_MAJOR}::DBus> + strawberry_core +) + +if(APPLE) + target_link_libraries(strawberry_globalshortcuts PRIVATE + "-framework ScriptingBridge" + strawberry_macstartup + ) +endif() diff --git a/src/globalshortcuts/globalshortcutgrabber.cpp b/src/globalshortcuts/globalshortcutgrabber.cpp index 2e1919bb60..7d96e9474e 100644 --- a/src/globalshortcuts/globalshortcutgrabber.cpp +++ b/src/globalshortcuts/globalshortcutgrabber.cpp @@ -32,7 +32,7 @@ #include #include "globalshortcutgrabber.h" -#include "ui_globalshortcutgrabber.h" +#include "globalshortcuts/ui_globalshortcutgrabber.h" using namespace Qt::Literals::StringLiterals; diff --git a/src/globalshortcuts/globalshortcutgrabber.mm b/src/globalshortcuts/globalshortcutgrabber.mm index 06cf3230fb..97c9f62a17 100644 --- a/src/globalshortcuts/globalshortcutgrabber.mm +++ b/src/globalshortcuts/globalshortcutgrabber.mm @@ -29,7 +29,7 @@ #include -#import "core/mac_startup.h" +#import "macstartup/mac_startup.h" class MacMonitorWrapper { public: diff --git a/src/globalshortcuts/globalshortcutsbackend-gnome.cpp b/src/globalshortcuts/globalshortcutsbackend-gnome.cpp index b12028ae9d..4613305ec7 100644 --- a/src/globalshortcuts/globalshortcutsbackend-gnome.cpp +++ b/src/globalshortcuts/globalshortcutsbackend-gnome.cpp @@ -35,7 +35,7 @@ #include "globalshortcutsbackend.h" #include "globalshortcutsbackend-gnome.h" -#include "gnomesettingsdaemon.h" +#include "globalshortcuts/gnomesettingsdaemon.h" using namespace Qt::Literals::StringLiterals; diff --git a/src/globalshortcuts/globalshortcutsbackend-kde.cpp b/src/globalshortcuts/globalshortcutsbackend-kde.cpp index 664c19d5cc..d6a50dbb7f 100644 --- a/src/globalshortcuts/globalshortcutsbackend-kde.cpp +++ b/src/globalshortcuts/globalshortcutsbackend-kde.cpp @@ -35,8 +35,8 @@ #include "globalshortcutsbackend-kde.h" -#include "kglobalaccel.h" -#include "kglobalaccelcomponent.h" +#include "globalshortcuts/kglobalaccel.h" +#include "globalshortcuts/kglobalaccelcomponent.h" using namespace Qt::Literals::StringLiterals; diff --git a/src/globalshortcuts/globalshortcutsbackend-macos.mm b/src/globalshortcuts/globalshortcutsbackend-macos.mm index 1f3de83cc2..6ac3d17a39 100644 --- a/src/globalshortcuts/globalshortcutsbackend-macos.mm +++ b/src/globalshortcuts/globalshortcutsbackend-macos.mm @@ -38,7 +38,7 @@ #include "globalshortcutsmanager.h" #include "core/logging.h" -#include "core/mac_startup.h" +#include "macstartup/mac_startup.h" #import "includes/SBSystemPreferences.h" diff --git a/src/globalshortcuts/globalshortcutsbackend-mate.cpp b/src/globalshortcuts/globalshortcutsbackend-mate.cpp index 013bd37c16..edeb03b4f2 100644 --- a/src/globalshortcuts/globalshortcutsbackend-mate.cpp +++ b/src/globalshortcuts/globalshortcutsbackend-mate.cpp @@ -33,7 +33,7 @@ #include "globalshortcutsbackend.h" #include "globalshortcutsbackend-mate.h" -#include "matesettingsdaemon.h" +#include "globalshortcuts/matesettingsdaemon.h" using namespace Qt::Literals::StringLiterals; diff --git a/src/lyrics/CMakeLists.txt b/src/lyrics/CMakeLists.txt new file mode 100644 index 0000000000..8d1fe0a513 --- /dev/null +++ b/src/lyrics/CMakeLists.txt @@ -0,0 +1,60 @@ +set(LYRICS_SOURCES + lyricsproviders.cpp + lyricsprovider.cpp + lyricssearchrequest.h + lyricssearchresult.h + lyricsfetcher.cpp + lyricsfetchersearch.cpp + jsonlyricsprovider.cpp + htmllyricsprovider.cpp + ovhlyricsprovider.cpp + lololyricsprovider.cpp + geniuslyricsprovider.cpp + musixmatchlyricsprovider.cpp + chartlyricsprovider.cpp + songlyricscomlyricsprovider.cpp + azlyricscomlyricsprovider.cpp + elyricsnetlyricsprovider.cpp + letraslyricsprovider.cpp + lyricfindlyricsprovider.cpp +) + +set(LYRICS_HEADERS + lyricsproviders.h + lyricsprovider.h + lyricsfetcher.h + lyricsfetchersearch.h + jsonlyricsprovider.h + htmllyricsprovider.h + ovhlyricsprovider.h + lololyricsprovider.h + geniuslyricsprovider.h + musixmatchlyricsprovider.h + chartlyricsprovider.h + songlyricscomlyricsprovider.h + azlyricscomlyricsprovider.h + elyricsnetlyricsprovider.h + letraslyricsprovider.h + lyricfindlyricsprovider.h +) + +qt_wrap_cpp(LYRICS_SOURCES ${LYRICS_HEADERS}) + +add_library(strawberry_lyrics STATIC ${LYRICS_SOURCES}) + +target_include_directories(strawberry_lyrics PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/src + ${CMAKE_BINARY_DIR}/src +) + +target_link_libraries(strawberry_lyrics PRIVATE + Qt${QT_VERSION_MAJOR}::Core + Qt${QT_VERSION_MAJOR}::Network + Qt${QT_VERSION_MAJOR}::Gui + Qt${QT_VERSION_MAJOR}::Widgets + strawberry_utilities + strawberry_core + strawberry_providers +) diff --git a/src/macstartup/CMakeLists.txt b/src/macstartup/CMakeLists.txt new file mode 100644 index 0000000000..3b637154d5 --- /dev/null +++ b/src/macstartup/CMakeLists.txt @@ -0,0 +1,22 @@ +set(MACSTARTUP_SOURCES mac_startup.mm) + +add_library(strawberry_macstartup STATIC ${MACSTARTUP_SOURCES}) + +target_include_directories(strawberry_macstartup PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/src + ${CMAKE_BINARY_DIR}/src +) + +target_link_libraries(strawberry_macstartup PRIVATE + "-framework Foundation" + "-framework AppKit" + "-framework IOKit" + Qt${QT_VERSION_MAJOR}::Core + Qt${QT_VERSION_MAJOR}::Widgets + SPMediaKeyTap + strawberry_utilities + strawberry_core + strawberry_globalshortcuts +) diff --git a/src/core/application.cpp b/src/main/application.cpp similarity index 99% rename from src/core/application.cpp rename to src/main/application.cpp index ee52e81100..3c2504c6f9 100644 --- a/src/core/application.cpp +++ b/src/main/application.cpp @@ -39,7 +39,7 @@ #include "core/database.h" #include "core/taskmanager.h" #include "core/networkaccessmanager.h" -#include "core/player.h" +#include "player/player.h" #include "tagreader/tagreaderclient.h" #include "engine/devicefinders.h" #include "core/urlhandlers.h" diff --git a/src/core/application.h b/src/main/application.h similarity index 100% rename from src/core/application.h rename to src/main/application.h diff --git a/src/main.cpp b/src/main/main.cpp similarity index 98% rename from src/main.cpp rename to src/main/main.cpp index 575d56ccc0..0a2368f817 100644 --- a/src/main.cpp +++ b/src/main/main.cpp @@ -82,7 +82,7 @@ #ifdef Q_OS_MACOS # include "utilities/macosutils.h" -# include "core/mac_startup.h" +# include "macstartup/mac_startup.h" #endif #ifdef HAVE_MPRIS2 @@ -93,9 +93,9 @@ #include "core/commandlineoptions.h" #include "core/networkproxyfactory.h" -#include "core/application.h" -#include "core/metatypes.h" -#include "core/mainwindow.h" +#include "main/application.h" +#include "main/metatypes.h" +#include "main/mainwindow.h" #ifdef Q_OS_MACOS # include "systemtrayicon/macsystemtrayicon.h" @@ -104,7 +104,7 @@ #endif #ifdef HAVE_TRANSLATIONS -# include "core/translations.h" +# include "main/translations.h" #endif #include "constants/behavioursettings.h" diff --git a/src/main.h b/src/main/main.h similarity index 100% rename from src/main.h rename to src/main/main.h diff --git a/src/core/mainwindow.cpp b/src/main/mainwindow.cpp similarity index 99% rename from src/core/mainwindow.cpp rename to src/main/mainwindow.cpp index c409335d83..835525f300 100644 --- a/src/core/mainwindow.cpp +++ b/src/main/mainwindow.cpp @@ -89,7 +89,7 @@ #include "constants/mainwindowsettings.h" #include "includes/shared_ptr.h" #include "core/commandlineoptions.h" -#include "core/mimedata.h" +#include "mimedata/mimedata.h" #include "core/iconloader.h" #include "core/taskmanager.h" #include "core/song.h" @@ -100,10 +100,10 @@ #include "core/filesystemmusicstorage.h" #include "core/deletefiles.h" #include "core/settings.h" -#include "core/player.h" #include "utilities/envutils.h" #include "utilities/filemanagerutils.h" #include "utilities/screenutils.h" +#include "player/player.h" #include "engine/enginebase.h" #include "dialogs/errordialog.h" #include "dialogs/about.h" @@ -112,8 +112,8 @@ #include "dialogs/deleteconfirmationdialog.h" #include "dialogs/lastfmimportdialog.h" #include "dialogs/snapdialog.h" -#include "dialogs/edittagdialog.h" -#include "dialogs/trackselectiondialog.h" +#include "edittagdialog/edittagdialog.h" +#include "edittagdialog/trackselectiondialog.h" #include "organize/organizedialog.h" #include "widgets/fancytabwidget.h" #include "widgets/playingwidget.h" @@ -213,7 +213,7 @@ #endif #ifdef Q_OS_MACOS -# include "core/mac_startup.h" +# include "macstartup/mac_startup.h" # include "systemtrayicon/macsystemtrayicon.h" # include "utilities/macosutils.h" #else diff --git a/src/core/mainwindow.h b/src/main/mainwindow.h similarity index 100% rename from src/core/mainwindow.h rename to src/main/mainwindow.h diff --git a/src/core/mainwindow.ui b/src/main/mainwindow.ui similarity index 100% rename from src/core/mainwindow.ui rename to src/main/mainwindow.ui diff --git a/src/core/metatypes.cpp b/src/main/metatypes.cpp similarity index 100% rename from src/core/metatypes.cpp rename to src/main/metatypes.cpp diff --git a/src/core/metatypes.h b/src/main/metatypes.h similarity index 100% rename from src/core/metatypes.h rename to src/main/metatypes.h diff --git a/src/core/translations.cpp b/src/main/translations.cpp similarity index 100% rename from src/core/translations.cpp rename to src/main/translations.cpp diff --git a/src/core/translations.h b/src/main/translations.h similarity index 100% rename from src/core/translations.h rename to src/main/translations.h diff --git a/src/mimedata/CMakeLists.txt b/src/mimedata/CMakeLists.txt new file mode 100644 index 0000000000..b3da5d16fc --- /dev/null +++ b/src/mimedata/CMakeLists.txt @@ -0,0 +1,27 @@ +set(MIMEDATA_SOURCES + mimedata.cpp + songmimedata.cpp +) + +set(MIMEDATA_HEADERS + mimedata.h + songmimedata.h +) + +qt_wrap_cpp(MIMEDATA_SOURCES ${MIMEDATA_HEADERS}) + +add_library(strawberry_mimedata STATIC ${MIMEDATA_SOURCES}) + +target_include_directories(strawberry_mimedata PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/src + ${CMAKE_BINARY_DIR}/src +) + +target_link_libraries(strawberry_mimedata PRIVATE + Qt${QT_VERSION_MAJOR}::Core + Qt${QT_VERSION_MAJOR}::Gui + strawberry_core + strawberry_collection +) diff --git a/src/core/mimedata.cpp b/src/mimedata/mimedata.cpp similarity index 100% rename from src/core/mimedata.cpp rename to src/mimedata/mimedata.cpp diff --git a/src/core/mimedata.h b/src/mimedata/mimedata.h similarity index 100% rename from src/core/mimedata.h rename to src/mimedata/mimedata.h diff --git a/src/core/songmimedata.cpp b/src/mimedata/songmimedata.cpp similarity index 100% rename from src/core/songmimedata.cpp rename to src/mimedata/songmimedata.cpp diff --git a/src/core/songmimedata.h b/src/mimedata/songmimedata.h similarity index 100% rename from src/core/songmimedata.h rename to src/mimedata/songmimedata.h diff --git a/src/moodbar/CMakeLists.txt b/src/moodbar/CMakeLists.txt new file mode 100644 index 0000000000..9f2c194aba --- /dev/null +++ b/src/moodbar/CMakeLists.txt @@ -0,0 +1,44 @@ +set(MOODBAR_SOURCES + moodbarbuilder.cpp + moodbarcontroller.cpp + moodbaritemdelegate.cpp + moodbarloader.cpp + moodbarpipeline.cpp + moodbarproxystyle.cpp + moodbarrenderer.cpp +) + +set(MOODBAR_HEADERS + moodbarcontroller.h + moodbaritemdelegate.h + moodbarloader.h + moodbarpipeline.h + moodbarproxystyle.h +) + +qt_wrap_cpp(MOODBAR_SOURCES ${MOODBAR_HEADERS}) + +add_library(strawberry_moodbar STATIC ${MOODBAR_SOURCES}) + +target_include_directories(strawberry_moodbar PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/src + ${CMAKE_BINARY_DIR}/src +) + +target_link_libraries(strawberry_moodbar PRIVATE + PkgConfig::GLIB + PkgConfig::GOBJECT + PkgConfig::GSTREAMER + PkgConfig::GSTREAMER_BASE + PkgConfig::GSTREAMER_AUDIO + PkgConfig::GSTREAMER_APP + PkgConfig::GSTREAMER_TAG + PkgConfig::GSTREAMER_PBUTILS + Qt${QT_VERSION_MAJOR}::Core + Qt${QT_VERSION_MAJOR}::Concurrent + Qt${QT_VERSION_MAJOR}::Network + Qt${QT_VERSION_MAJOR}::Gui + Qt${QT_VERSION_MAJOR}::Widgets +) diff --git a/src/moodbar/moodbarcontroller.cpp b/src/moodbar/moodbarcontroller.cpp index 0aba7d9581..4dbba36a07 100644 --- a/src/moodbar/moodbarcontroller.cpp +++ b/src/moodbar/moodbarcontroller.cpp @@ -25,7 +25,7 @@ #include "core/song.h" #include "core/settings.h" -#include "core/player.h" +#include "player/player.h" #include "engine/enginebase.h" #include "constants/moodbarsettings.h" diff --git a/src/mpris2/CMakeLists.txt b/src/mpris2/CMakeLists.txt new file mode 100644 index 0000000000..d5c11c7613 --- /dev/null +++ b/src/mpris2/CMakeLists.txt @@ -0,0 +1,33 @@ +set(MPRIS2_SOURCES + mpris2.cpp +) + +set(MPRIS2_HEADERS + mpris2.h +) + +qt_wrap_cpp(MPRIS2_SOURCES ${MPRIS2_HEADERS}) + +qt_add_dbus_adaptor(MPRIS2_SOURCES org.mpris.MediaPlayer2.xml mpris2.h mpris::Mpris2 mpris2_root Mpris2Root) +qt_add_dbus_adaptor(MPRIS2_SOURCES org.mpris.MediaPlayer2.Player.xml mpris2.h mpris::Mpris2 mpris2_player Mpris2Player) +qt_add_dbus_adaptor(MPRIS2_SOURCES org.mpris.MediaPlayer2.TrackList.xml mpris2.h mpris::Mpris2 mpris2_tracklist Mpris2TrackList) +qt_add_dbus_adaptor(MPRIS2_SOURCES org.mpris.MediaPlayer2.Playlists.xml mpris2.h mpris::Mpris2 mpris2_playlists Mpris2Playlists) + +add_library(strawberry_mpris2 STATIC ${MPRIS2_SOURCES}) + +target_include_directories(strawberry_mpris2 PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/src + ${CMAKE_BINARY_DIR}/src +) + +target_link_libraries(strawberry_mpris2 PRIVATE + Qt${QT_VERSION_MAJOR}::Core + Qt${QT_VERSION_MAJOR}::Network + Qt${QT_VERSION_MAJOR}::DBus + Qt${QT_VERSION_MAJOR}::Widgets + strawberry_core + strawberry_engine + strawberry_player +) diff --git a/src/mpris2/mpris2.cpp b/src/mpris2/mpris2.cpp index 94ae894bbb..c61e731483 100644 --- a/src/mpris2/mpris2.cpp +++ b/src/mpris2/mpris2.cpp @@ -48,7 +48,7 @@ #include "constants/timeconstants.h" #include "core/song.h" -#include "core/player.h" +#include "player/player.h" #include "engine/enginebase.h" #include "playlist/playlist.h" #include "playlist/playlistitem.h" diff --git a/src/musicbrainz/CMakeLists.txt b/src/musicbrainz/CMakeLists.txt new file mode 100644 index 0000000000..0aed297008 --- /dev/null +++ b/src/musicbrainz/CMakeLists.txt @@ -0,0 +1,40 @@ +set(MUSICBRAINZ_SOURCES + acoustidclient.cpp + musicbrainzclient.cpp + tagfetcher.cpp +) + +set(MUSICBRAINZ_HEADERS + acoustidclient.h + musicbrainzclient.h + tagfetcher.h +) + +qt_wrap_cpp(MUSICBRAINZ_SOURCES ${MUSICBRAINZ_HEADERS}) + +add_library(strawberry_musicbrainz STATIC ${MUSICBRAINZ_SOURCES}) + +target_include_directories(strawberry_musicbrainz PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/src + ${CMAKE_BINARY_DIR}/src +) + +target_link_libraries(strawberry_musicbrainz PRIVATE + PkgConfig::GLIB + PkgConfig::GOBJECT + PkgConfig::GSTREAMER + PkgConfig::GSTREAMER_BASE + PkgConfig::GSTREAMER_AUDIO + PkgConfig::GSTREAMER_APP + PkgConfig::GSTREAMER_TAG + PkgConfig::GSTREAMER_PBUTILS + Qt${QT_VERSION_MAJOR}::Core + Qt${QT_VERSION_MAJOR}::Concurrent + Qt${QT_VERSION_MAJOR}::Network + Qt${QT_VERSION_MAJOR}::Gui + strawberry_utilities + strawberry_core + strawberry_engine +) diff --git a/src/organize/CMakeLists.txt b/src/organize/CMakeLists.txt new file mode 100644 index 0000000000..db64825b9d --- /dev/null +++ b/src/organize/CMakeLists.txt @@ -0,0 +1,55 @@ +set(ORGANIZE_SOURCES + organize.cpp + organizeformat.cpp + organizeformatvalidator.cpp + organizesyntaxhighlighter.cpp + organizedialog.cpp + organizeerrordialog.cpp +) + +set(ORGANIZE_HEADERS + organize.h + organizeformatvalidator.h + organizesyntaxhighlighter.h + organizedialog.h + organizeerrordialog.h +) + +set(ORGANIZE_UI + organizedialog.ui + organizeerrordialog.ui +) + +qt_wrap_cpp(ORGANIZE_SOURCES ${ORGANIZE_HEADERS}) +qt_wrap_ui(ORGANIZE_SOURCES ${ORGANIZE_UI}) + +add_library(strawberry_organize STATIC ${ORGANIZE_SOURCES}) + +target_include_directories(strawberry_organize PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/src + ${CMAKE_BINARY_DIR}/src +) + +target_link_libraries(strawberry_organize PRIVATE + PkgConfig::GLIB + PkgConfig::GOBJECT + PkgConfig::GSTREAMER + PkgConfig::GSTREAMER_BASE + PkgConfig::GSTREAMER_AUDIO + PkgConfig::GSTREAMER_APP + PkgConfig::GSTREAMER_TAG + PkgConfig::GSTREAMER_PBUTILS + Qt${QT_VERSION_MAJOR}::Core + Qt${QT_VERSION_MAJOR}::Concurrent + Qt${QT_VERSION_MAJOR}::Network + Qt${QT_VERSION_MAJOR}::Sql + Qt${QT_VERSION_MAJOR}::Gui + Qt${QT_VERSION_MAJOR}::Widgets + strawberry_utilities + strawberry_core + strawberry_tagreader + strawberry_widgets + strawberry_collection +) diff --git a/src/osd/CMakeLists.txt b/src/osd/CMakeLists.txt new file mode 100644 index 0000000000..a57b18c7de --- /dev/null +++ b/src/osd/CMakeLists.txt @@ -0,0 +1,46 @@ +set(OSD_SOURCES osdbase.cpp osdpretty.cpp) +set(OSD_HEADERS osdbase.h osdpretty.h) +set(OSD_UI osdpretty.ui) + +if(APPLE) + list(APPEND OSD_SOURCES osdmac.mm) + list(APPEND OSD_HEADERS osdmac.h) +endif() + +if(HAVE_DBUS) + list(APPEND OSD_SOURCES osddbus.cpp) + list(APPEND OSD_HEADERS osddbus.h) + qt_add_dbus_interface(OSD_SOURCES org.freedesktop.Notifications.xml notification) +endif() + +qt_wrap_cpp(OSD_SOURCES ${OSD_HEADERS}) +qt_wrap_ui(OSD_SOURCES ${OSD_UI}) + +add_library(strawberry_osd STATIC ${OSD_SOURCES}) + +target_include_directories(strawberry_osd PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/src + ${CMAKE_BINARY_DIR}/src +) + +if(HAVE_QPA_QPLATFORMNATIVEINTERFACE_H) + target_include_directories(strawberry_osd SYSTEM PRIVATE ${Qt${QT_VERSION_MAJOR}Gui_PRIVATE_INCLUDE_DIRS}) +endif() + +target_link_libraries(strawberry_osd PRIVATE + PkgConfig::GLIB + PkgConfig::GOBJECT + PkgConfig::SQLITE + Qt${QT_VERSION_MAJOR}::Core + Qt${QT_VERSION_MAJOR}::Concurrent + Qt${QT_VERSION_MAJOR}::Network + Qt${QT_VERSION_MAJOR}::Sql + $<$:Qt${QT_VERSION_MAJOR}::DBus> + Qt${QT_VERSION_MAJOR}::Gui + Qt${QT_VERSION_MAJOR}::Widgets + strawberry_utilities + strawberry_core + strawberry_systemtrayicon +) diff --git a/src/osd/osdpretty.cpp b/src/osd/osdpretty.cpp index a884d3e963..f8dba75978 100644 --- a/src/osd/osdpretty.cpp +++ b/src/osd/osdpretty.cpp @@ -59,7 +59,7 @@ #include "constants/notificationssettings.h" #include "osdpretty.h" -#include "ui_osdpretty.h" +#include "osd/ui_osdpretty.h" #ifdef Q_OS_WIN # include diff --git a/src/player/CMakeLists.txt b/src/player/CMakeLists.txt new file mode 100644 index 0000000000..f0f176624d --- /dev/null +++ b/src/player/CMakeLists.txt @@ -0,0 +1,42 @@ +set(PLAYER_SOURCES + playerinterface.cpp + player.cpp +) + +set(PLAYER_HEADERS + playerinterface.h + player.h +) + +qt_wrap_cpp(PLAYER_SOURCES ${PLAYER_HEADERS}) + +add_library(strawberry_player STATIC ${PLAYER_SOURCES}) + +target_include_directories(strawberry_player PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/src + ${CMAKE_BINARY_DIR}/src +) + +target_link_libraries(strawberry_player PRIVATE + PkgConfig::GLIB + PkgConfig::GOBJECT + PkgConfig::GSTREAMER + PkgConfig::GSTREAMER_BASE + PkgConfig::GSTREAMER_AUDIO + PkgConfig::GSTREAMER_APP + PkgConfig::GSTREAMER_TAG + PkgConfig::GSTREAMER_PBUTILS + Qt${QT_VERSION_MAJOR}::Core + Qt${QT_VERSION_MAJOR}::Network + Qt${QT_VERSION_MAJOR}::Sql + Qt${QT_VERSION_MAJOR}::Gui + Qt${QT_VERSION_MAJOR}::Widgets + strawberry_core + strawberry_engine + strawberry_collection + strawberry_playlist + strawberry_equalizer + strawberry_analyzer +) diff --git a/src/core/player.cpp b/src/player/player.cpp similarity index 100% rename from src/core/player.cpp rename to src/player/player.cpp diff --git a/src/core/player.h b/src/player/player.h similarity index 100% rename from src/core/player.h rename to src/player/player.h diff --git a/src/core/playerinterface.cpp b/src/player/playerinterface.cpp similarity index 100% rename from src/core/playerinterface.cpp rename to src/player/playerinterface.cpp diff --git a/src/core/playerinterface.h b/src/player/playerinterface.h similarity index 100% rename from src/core/playerinterface.h rename to src/player/playerinterface.h diff --git a/src/playlist/CMakeLists.txt b/src/playlist/CMakeLists.txt new file mode 100644 index 0000000000..02cf6b3649 --- /dev/null +++ b/src/playlist/CMakeLists.txt @@ -0,0 +1,110 @@ +set(PLAYLIST_SOURCES + playlist.cpp + playlistbackend.cpp + playlistcontainer.cpp + playlistdelegates.cpp + playlistfilter.cpp + playlistheader.cpp + playlistitem.cpp + playlistitemmimedata.cpp + playlistlistcontainer.cpp + playlistlistmodel.cpp + playlistlistsortfiltermodel.cpp + playlistlistview.cpp + playlistmanagerinterface.cpp + playlistmanager.cpp + playlistsaveoptionsdialog.cpp + playlistsequence.cpp + playlisttabbar.cpp + playlistview.cpp + playlistproxystyle.cpp + songloaderinserter.cpp + songplaylistitem.cpp + dynamicplaylistcontrols.cpp + playlistundocommandbase.cpp + playlistundocommandinsertitems.cpp + playlistundocommandremoveitems.cpp + playlistundocommandmoveitems.cpp + playlistundocommandreorderitems.cpp + playlistundocommandsortitems.cpp + playlistundocommandshuffleitems.cpp +) + +set(PLAYLIST_HEADERS + playlist.h + playlistbackend.h + playlistcontainer.h + playlistdelegates.h + playlistfilter.h + playlistheader.h + playlistlistcontainer.h + playlistlistmodel.h + playlistlistview.h + playlistlistsortfiltermodel.h + playlistmanagerinterface.h + playlistmanager.h + playlistsaveoptionsdialog.h + playlistsequence.h + playlisttabbar.h + playlistview.h + playlistproxystyle.h + playlistitemmimedata.h + songloaderinserter.h + dynamicplaylistcontrols.h +) + +set(PLAYLIST_UI + playlistcontainer.ui + playlistlistcontainer.ui + playlistsaveoptionsdialog.ui + playlistsequence.ui + dynamicplaylistcontrols.ui +) + +qt_wrap_cpp(PLAYLIST_SOURCES ${PLAYLIST_HEADERS}) +qt_wrap_ui(PLAYLIST_SOURCES ${PLAYLIST_UI}) + +add_library(strawberry_playlist STATIC ${PLAYLIST_SOURCES}) + +target_include_directories(strawberry_playlist PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/src + ${CMAKE_BINARY_DIR}/src +) + +target_link_libraries(strawberry_playlist PRIVATE + PkgConfig::GLIB + PkgConfig::GOBJECT + PkgConfig::GSTREAMER + PkgConfig::GSTREAMER_BASE + PkgConfig::GSTREAMER_AUDIO + PkgConfig::GSTREAMER_APP + PkgConfig::GSTREAMER_TAG + PkgConfig::GSTREAMER_PBUTILS + Qt${QT_VERSION_MAJOR}::Core + Qt${QT_VERSION_MAJOR}::Concurrent + Qt${QT_VERSION_MAJOR}::Network + Qt${QT_VERSION_MAJOR}::Sql + Qt${QT_VERSION_MAJOR}::Gui + Qt${QT_VERSION_MAJOR}::Widgets + strawberry_utilities + strawberry_core + strawberry_mimedata + strawberry_songloader + strawberry_tagreader + strawberry_collection + strawberry_dialogs + strawberry_queue + strawberry_filterparser + strawberry_covermanager + strawberry_widgets + strawberry_player + strawberry_smartplaylists + strawberry_radios + strawberry_device +) + +if(HAVE_MOODBAR) + target_link_libraries(strawberry_playlist PRIVATE strawberry_moodbar) +endif() diff --git a/src/playlist/playlist.cpp b/src/playlist/playlist.cpp index e09cbc8e8c..29fa5b91fc 100644 --- a/src/playlist/playlist.cpp +++ b/src/playlist/playlist.cpp @@ -60,10 +60,10 @@ #include "includes/shared_ptr.h" #include "core/logging.h" -#include "core/mimedata.h" +#include "mimedata/mimedata.h" #include "core/song.h" #include "core/settings.h" -#include "core/songmimedata.h" +#include "mimedata/songmimedata.h" #include "constants/timeconstants.h" #include "constants/playlistsettings.h" #include "tagreader/tagreaderclient.h" diff --git a/src/playlist/playlistitemmimedata.h b/src/playlist/playlistitemmimedata.h index d4fc8acd1f..712ed8a962 100644 --- a/src/playlist/playlistitemmimedata.h +++ b/src/playlist/playlistitemmimedata.h @@ -26,7 +26,7 @@ #include -#include "core/mimedata.h" +#include "mimedata/mimedata.h" #include "playlistitem.h" class PlaylistItemMimeData : public MimeData { diff --git a/src/playlist/playlisttabbar.cpp b/src/playlist/playlisttabbar.cpp index 2625731ec8..6d461a444f 100644 --- a/src/playlist/playlisttabbar.cpp +++ b/src/playlist/playlisttabbar.cpp @@ -46,7 +46,7 @@ #include "includes/shared_ptr.h" #include "core/logging.h" #include "core/iconloader.h" -#include "core/mimedata.h" +#include "mimedata/mimedata.h" #include "core/settings.h" #include "widgets/favoritewidget.h" #include "widgets/renametablineedit.h" diff --git a/src/playlist/playlistview.cpp b/src/playlist/playlistview.cpp index def6eba8f3..32315aaf96 100644 --- a/src/playlist/playlistview.cpp +++ b/src/playlist/playlistview.cpp @@ -62,7 +62,7 @@ #include "includes/qt_blurimage.h" #include "core/song.h" #include "core/settings.h" -#include "core/player.h" +#include "player/player.h" #include "playlistmanager.h" #include "playlist.h" #include "playlistdelegates.h" diff --git a/src/playlist/songloaderinserter.cpp b/src/playlist/songloaderinserter.cpp index 005944f6f2..e2865555d2 100644 --- a/src/playlist/songloaderinserter.cpp +++ b/src/playlist/songloaderinserter.cpp @@ -32,7 +32,7 @@ #include "core/logging.h" #include "core/urlhandlers.h" #include "core/taskmanager.h" -#include "core/songloader.h" +#include "songloader/songloader.h" #include "playlist.h" #include "songloaderinserter.h" diff --git a/src/playlistparsers/CMakeLists.txt b/src/playlistparsers/CMakeLists.txt new file mode 100644 index 0000000000..a8051fb593 --- /dev/null +++ b/src/playlistparsers/CMakeLists.txt @@ -0,0 +1,47 @@ +set(PLAYLISTPARSERS_SOURCES + parserbase.cpp + playlistparser.cpp + asxiniparser.cpp + asxparser.cpp + cueparser.cpp + m3uparser.cpp + plsparser.cpp + wplparser.cpp + xmlparser.cpp + xspfparser.cpp +) + +set(PLAYLISTPARSERS_HEADERS + parserbase.h + playlistparser.h + asxiniparser.h + asxparser.h + cueparser.h + m3uparser.h + plsparser.h + wplparser.h + xmlparser.h + xspfparser.h +) + +qt_wrap_cpp(PLAYLISTPARSERS_SOURCES ${PLAYLISTPARSERS_HEADERS}) + +add_library(strawberry_playlistparsers STATIC ${PLAYLISTPARSERS_SOURCES}) + +target_include_directories(strawberry_playlistparsers PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/src + ${CMAKE_BINARY_DIR}/src +) + +target_link_libraries(strawberry_playlistparsers PRIVATE + Qt${QT_VERSION_MAJOR}::Core + Qt${QT_VERSION_MAJOR}::Network + Qt${QT_VERSION_MAJOR}::Sql + Qt${QT_VERSION_MAJOR}::Gui + strawberry_utilities + strawberry_core + strawberry_tagreader + strawberry_collection +) diff --git a/src/providers/CMakeLists.txt b/src/providers/CMakeLists.txt new file mode 100644 index 0000000000..b2649df662 --- /dev/null +++ b/src/providers/CMakeLists.txt @@ -0,0 +1,16 @@ +set(PROVIDERS_SOURCES + musixmatchprovider.cpp +) + +add_library(strawberry_providers STATIC ${PROVIDERS_SOURCES}) + +target_include_directories(strawberry_providers PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/src + ${CMAKE_BINARY_DIR}/src +) + +target_link_libraries(strawberry_providers PRIVATE + Qt${QT_VERSION_MAJOR}::Core +) diff --git a/src/qobuz/CMakeLists.txt b/src/qobuz/CMakeLists.txt new file mode 100644 index 0000000000..dfffb1d102 --- /dev/null +++ b/src/qobuz/CMakeLists.txt @@ -0,0 +1,41 @@ +set(QOBUZ_SOURCES + qobuzservice.cpp + qobuzurlhandler.cpp + qobuzbaserequest.cpp + qobuzrequest.cpp + qobuzstreamurlrequest.cpp + qobuzfavoriterequest.cpp +) + +set(QOBUZ_HEADERS + qobuzservice.h + qobuzurlhandler.h + qobuzbaserequest.h + qobuzrequest.h + qobuzstreamurlrequest.h + qobuzfavoriterequest.h +) + +qt_wrap_cpp(QOBUZ_SOURCES ${QOBUZ_HEADERS}) +qt_wrap_ui(QOBUZ_SOURCES ${QOBUZ_UI}) + +add_library(strawberry_qobuz STATIC ${QOBUZ_SOURCES}) + +target_include_directories(strawberry_qobuz PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/src + ${CMAKE_BINARY_DIR}/src +) + +target_link_libraries(strawberry_qobuz PRIVATE + Qt${QT_VERSION_MAJOR}::Core + Qt${QT_VERSION_MAJOR}::Network + Qt${QT_VERSION_MAJOR}::Sql + Qt${QT_VERSION_MAJOR}::Gui + Qt${QT_VERSION_MAJOR}::Widgets + strawberry_utilities + strawberry_core + strawberry_collection + strawberry_streaming +) diff --git a/src/queue/CMakeLists.txt b/src/queue/CMakeLists.txt new file mode 100644 index 0000000000..bbb2f1b9b6 --- /dev/null +++ b/src/queue/CMakeLists.txt @@ -0,0 +1,33 @@ +set(QUEUE_SOURCES + queue.cpp + queueview.cpp +) + +set(QUEUE_HEADERS + queue.h + queueview.h +) + +set(QUEUE_UI + queueview.ui +) + +qt_wrap_cpp(QUEUE_SOURCES ${QUEUE_HEADERS}) +qt_wrap_ui(QUEUE_SOURCES ${QUEUE_UI}) + +add_library(strawberry_queue STATIC ${QUEUE_SOURCES}) + +target_include_directories(strawberry_queue PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/src + ${CMAKE_BINARY_DIR}/src +) + +target_link_libraries(strawberry_queue PRIVATE + Qt${QT_VERSION_MAJOR}::Core + Qt${QT_VERSION_MAJOR}::Network + Qt${QT_VERSION_MAJOR}::Widgets + strawberry_core + strawberry_playlist +) diff --git a/src/radios/CMakeLists.txt b/src/radios/CMakeLists.txt new file mode 100644 index 0000000000..79fca5af7c --- /dev/null +++ b/src/radios/CMakeLists.txt @@ -0,0 +1,54 @@ +set(RADIOS_SOURCES + radioservices.cpp + radiobackend.cpp + radiomodel.cpp + radioview.cpp + radioviewcontainer.cpp + radioservice.cpp + radioplaylistitem.cpp + radiochannel.cpp + somafmservice.cpp + radioparadiseservice.cpp + radiomimedata.cpp +) + +set(RADIOS_HEADERS + radioservices.h + radiobackend.h + radiomodel.h + radioview.h + radioviewcontainer.h + radioservice.h + radiomimedata.h + somafmservice.h + radioparadiseservice.h +) + +set(RADIOS_UI + radioviewcontainer.ui +) + +qt_wrap_cpp(RADIOS_SOURCES ${RADIOS_HEADERS}) +qt_wrap_ui(RADIOS_SOURCES ${RADIOS_UI}) + +add_library(strawberry_radios STATIC ${RADIOS_SOURCES}) + +target_include_directories(strawberry_radios PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/src + ${CMAKE_BINARY_DIR}/src +) + +target_link_libraries(strawberry_radios PRIVATE + PkgConfig::GLIB + PkgConfig::GOBJECT + Qt${QT_VERSION_MAJOR}::Core + Qt${QT_VERSION_MAJOR}::Concurrent + Qt${QT_VERSION_MAJOR}::Network + Qt${QT_VERSION_MAJOR}::Sql + Qt${QT_VERSION_MAJOR}::Gui + Qt${QT_VERSION_MAJOR}::Widgets + strawberry_core + strawberry_collection +) diff --git a/src/radios/radiomimedata.h b/src/radios/radiomimedata.h index bdf95b835c..38e9dd4fdb 100644 --- a/src/radios/radiomimedata.h +++ b/src/radios/radiomimedata.h @@ -22,7 +22,7 @@ #include -#include "core/mimedata.h" +#include "mimedata/mimedata.h" #include "core/song.h" class RadioMimeData : public MimeData { diff --git a/src/radios/radioview.cpp b/src/radios/radioview.cpp index 36b36e4d90..1c2aaa8f00 100644 --- a/src/radios/radioview.cpp +++ b/src/radios/radioview.cpp @@ -27,7 +27,7 @@ #include #include -#include "core/mimedata.h" +#include "mimedata/mimedata.h" #include "core/iconloader.h" #include "radiomodel.h" #include "radioview.h" diff --git a/src/radios/radioviewcontainer.h b/src/radios/radioviewcontainer.h index 3f2a4c7b84..ffa5f43030 100644 --- a/src/radios/radioviewcontainer.h +++ b/src/radios/radioviewcontainer.h @@ -22,7 +22,7 @@ #include -#include "ui_radioviewcontainer.h" +#include "radios/ui_radioviewcontainer.h" class RadioView; diff --git a/src/scrobbler/CMakeLists.txt b/src/scrobbler/CMakeLists.txt new file mode 100644 index 0000000000..28611483b0 --- /dev/null +++ b/src/scrobbler/CMakeLists.txt @@ -0,0 +1,53 @@ +set(SCROBBLER_SOURCES + audioscrobbler.cpp + scrobblersettingsservice.cpp + scrobblerservice.cpp + scrobblercache.cpp + scrobblercacheitem.cpp + scrobblemetadata.cpp + scrobblingapi20.cpp + lastfmscrobbler.cpp + librefmscrobbler.cpp + listenbrainzscrobbler.cpp + lastfmimport.cpp +) + +set(SCROBBLER_HEADERS + audioscrobbler.h + scrobblersettingsservice.h + scrobblerservice.h + scrobblercache.h + scrobblingapi20.h + lastfmscrobbler.h + librefmscrobbler.h + listenbrainzscrobbler.h + lastfmimport.h +) + +if(HAVE_SUBSONIC) + list(APPEND SCROBBLER_SOURCES subsonicscrobbler.cpp) + list(APPEND SCROBBLER_HEADERS subsonicscrobbler.h) +endif() + +qt_wrap_cpp(SCROBBLER_SOURCES ${SCROBBLER_HEADERS}) + +add_library(strawberry_scrobbler STATIC ${SCROBBLER_SOURCES}) + +target_include_directories(strawberry_scrobbler PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/src + ${CMAKE_BINARY_DIR}/src +) + +target_link_libraries(strawberry_scrobbler PRIVATE + Qt${QT_VERSION_MAJOR}::Core + Qt${QT_VERSION_MAJOR}::Network + Qt${QT_VERSION_MAJOR}::Gui + Qt${QT_VERSION_MAJOR}::Widgets + strawberry_core +) + +if(HAVE_SUBSONIC) + target_link_libraries(strawberry_scrobbler PRIVATE strawberry_subsonic) +endif() diff --git a/src/settings/CMakeLists.txt b/src/settings/CMakeLists.txt new file mode 100644 index 0000000000..60e1a72805 --- /dev/null +++ b/src/settings/CMakeLists.txt @@ -0,0 +1,135 @@ +set(SETTINGS_SOURCES + settingsdialog.cpp + settingspage.cpp + settingsitemdelegate.cpp + behavioursettingspage.cpp + collectionsettingspage.cpp + collectionsettingsdirectorymodel.cpp + backendsettingspage.cpp + playlistsettingspage.cpp + scrobblersettingspage.cpp + coverssettingspage.cpp + lyricssettingspage.cpp + networkproxysettingspage.cpp + appearancesettingspage.cpp + contextsettingspage.cpp + notificationssettingspage.cpp + transcodersettingspage.cpp +) + +set(SETTINGS_HEADERS + settingsdialog.h + settingspage.h + settingsitemdelegate.h + behavioursettingspage.h + collectionsettingspage.h + collectionsettingsdirectorymodel.h + backendsettingspage.h + playlistsettingspage.h + scrobblersettingspage.h + coverssettingspage.h + lyricssettingspage.h + networkproxysettingspage.h + appearancesettingspage.h + contextsettingspage.h + notificationssettingspage.h + transcodersettingspage.h +) + +set(SETTINGS_UI + settingsdialog.ui + behavioursettingspage.ui + collectionsettingspage.ui + backendsettingspage.ui + contextsettingspage.ui + playlistsettingspage.ui + scrobblersettingspage.ui + coverssettingspage.ui + lyricssettingspage.ui + networkproxysettingspage.ui + appearancesettingspage.ui + notificationssettingspage.ui + transcodersettingspage.ui +) + +if(HAVE_MOODBAR) + list(APPEND SETTINGS_SOURCES moodbarsettingspage.cpp) + list(APPEND SETTINGS_HEADERS moodbarsettingspage.h) + list(APPEND SETTINGS_UI moodbarsettingspage.ui) +endif() + +if(HAVE_SUBSONIC) + list(APPEND SETTINGS_SOURCES subsonicsettingspage.cpp) + list(APPEND SETTINGS_HEADERS subsonicsettingspage.h) + list(APPEND SETTINGS_UI subsonicsettingspage.ui) +endif() + +if(HAVE_TIDAL) + list(APPEND SETTINGS_SOURCES tidalsettingspage.cpp) + list(APPEND SETTINGS_HEADERS tidalsettingspage.h) + list(APPEND SETTINGS_UI tidalsettingspage.ui) +endif() + +if(HAVE_SPOTIFY) + list(APPEND SETTINGS_SOURCES spotifysettingspage.cpp) + list(APPEND SETTINGS_HEADERS spotifysettingspage.h) + list(APPEND SETTINGS_UI spotifysettingspage.ui) +endif() + +if(HAVE_QOBUZ) + list(APPEND SETTINGS_SOURCES qobuzsettingspage.cpp) + list(APPEND SETTINGS_HEADERS qobuzsettingspage.h) + list(APPEND SETTINGS_UI qobuzsettingspage.ui) +endif() + +if(HAVE_GLOBALSHORTCUTS) + list(APPEND SETTINGS_SOURCES globalshortcutssettingspage.cpp) + list(APPEND SETTINGS_HEADERS globalshortcutssettingspage.h) + list(APPEND SETTINGS_UI globalshortcutssettingspage.ui) +endif() + +qt_wrap_cpp(SETTINGS_SOURCES ${SETTINGS_HEADERS}) +qt_wrap_ui(SETTINGS_SOURCES ${SETTINGS_UI}) + +add_library(strawberry_settings STATIC ${SETTINGS_SOURCES}) + +target_include_directories(strawberry_settings PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/src + ${CMAKE_BINARY_DIR}/src +) + +target_link_libraries(strawberry_settings PRIVATE + PkgConfig::GLIB + PkgConfig::GOBJECT + PkgConfig::GSTREAMER + PkgConfig::GSTREAMER_BASE + PkgConfig::GSTREAMER_AUDIO + PkgConfig::GSTREAMER_APP + PkgConfig::GSTREAMER_TAG + PkgConfig::GSTREAMER_PBUTILS + Qt${QT_VERSION_MAJOR}::Core + Qt${QT_VERSION_MAJOR}::Concurrent + Qt${QT_VERSION_MAJOR}::Network + Qt${QT_VERSION_MAJOR}::Sql + Qt${QT_VERSION_MAJOR}::Gui + Qt${QT_VERSION_MAJOR}::Widgets + strawberry_utilities + strawberry_core + strawberry_engine + strawberry_covermanager + strawberry_lyrics + strawberry_widgets + strawberry_osd + strawberry_transcoder + strawberry_streaming +) + +if(HAVE_MOODBAR) + target_link_libraries(strawberry_settings PRIVATE strawberry_moodbar) +endif() + +if(HAVE_GLOBALSHORTCUTS) + target_link_libraries(strawberry_settings PRIVATE strawberry_globalshortcuts) +endif() diff --git a/src/settings/backendsettingspage.cpp b/src/settings/backendsettingspage.cpp index d605296b62..d022e789a2 100644 --- a/src/settings/backendsettingspage.cpp +++ b/src/settings/backendsettingspage.cpp @@ -45,7 +45,7 @@ #include "core/iconloader.h" #include "core/logging.h" #include "core/settings.h" -#include "core/player.h" +#include "player/player.h" #include "engine/enginebase.h" #include "engine/enginedevice.h" #include "engine/devicefinders.h" diff --git a/src/settings/settingsdialog.cpp b/src/settings/settingsdialog.cpp index 33f277cb26..19718137e5 100644 --- a/src/settings/settingsdialog.cpp +++ b/src/settings/settingsdialog.cpp @@ -48,7 +48,7 @@ #include #include "core/settings.h" -#include "core/player.h" +#include "player/player.h" #include "utilities/screenutils.h" #include "widgets/groupediconview.h" #include "collection/collectionlibrary.h" diff --git a/src/smartplaylists/CMakeLists.txt b/src/smartplaylists/CMakeLists.txt new file mode 100644 index 0000000000..291b267d77 --- /dev/null +++ b/src/smartplaylists/CMakeLists.txt @@ -0,0 +1,77 @@ +set(SMARTPLAYLISTS_SOURCES + playlistgenerator.cpp + playlistgeneratorinserter.cpp + playlistgeneratormimedata.cpp + playlistquerygenerator.cpp + smartplaylistquerywizardplugin.cpp + smartplaylistquerywizardpluginsortpage.cpp + smartplaylistquerywizardpluginsearchpage.cpp + smartplaylistsearch.cpp + smartplaylistsearchpreview.cpp + smartplaylistsearchterm.cpp + smartplaylistsearchtermwidget.cpp + smartplaylistsearchtermwidgetoverlay.cpp + smartplaylistsmodel.cpp + smartplaylistsviewcontainer.cpp + smartplaylistsview.cpp + smartplaylistwizard.cpp + smartplaylistwizardplugin.cpp + smartplaylistwizardtypepage.cpp + smartplaylistwizardfinishpage.cpp +) + +set(SMARTPLAYLISTS_HEADERS + playlistgenerator.h + playlistgeneratorinserter.h + playlistquerygenerator.h + playlistgeneratormimedata.h + smartplaylistquerywizardplugin.h + smartplaylistquerywizardpluginsortpage.h + smartplaylistquerywizardpluginsearchpage.h + smartplaylistsearchpreview.h + smartplaylistsearchtermwidget.h + smartplaylistsearchtermwidgetoverlay.h + smartplaylistsmodel.h + smartplaylistsviewcontainer.h + smartplaylistsview.h + smartplaylistwizard.h + smartplaylistwizardplugin.h + smartplaylistwizardtypepage.h + smartplaylistwizardfinishpage.h +) + +set(SMARTPLAYLISTS_UI + smartplaylistquerysearchpage.ui + smartplaylistquerysortpage.ui + smartplaylistsearchpreview.ui + smartplaylistsearchtermwidget.ui + smartplaylistsviewcontainer.ui + smartplaylistwizardfinishpage.ui +) + +qt_wrap_cpp(SMARTPLAYLISTS_SOURCES ${SMARTPLAYLISTS_HEADERS}) +qt_wrap_ui(SMARTPLAYLISTS_SOURCES ${SMARTPLAYLISTS_UI}) + +add_library(strawberry_smartplaylists STATIC ${SMARTPLAYLISTS_SOURCES}) + +target_include_directories(strawberry_smartplaylists PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/src + ${CMAKE_BINARY_DIR}/src +) + +target_link_libraries(strawberry_smartplaylists PRIVATE + PkgConfig::GLIB + PkgConfig::GOBJECT + Qt${QT_VERSION_MAJOR}::Core + Qt${QT_VERSION_MAJOR}::Concurrent + Qt${QT_VERSION_MAJOR}::Network + Qt${QT_VERSION_MAJOR}::Sql + Qt${QT_VERSION_MAJOR}::Gui + Qt${QT_VERSION_MAJOR}::Widgets + strawberry_core + strawberry_filterparser + strawberry_collection + strawberry_playlist +) diff --git a/src/smartplaylists/playlistgeneratormimedata.h b/src/smartplaylists/playlistgeneratormimedata.h index e33623f41d..fb2a5e77c7 100644 --- a/src/smartplaylists/playlistgeneratormimedata.h +++ b/src/smartplaylists/playlistgeneratormimedata.h @@ -23,7 +23,7 @@ #include "config.h" -#include "core/mimedata.h" +#include "mimedata/mimedata.h" #include "playlistgenerator_fwd.h" class PlaylistGeneratorMimeData : public MimeData { diff --git a/src/smartplaylists/smartplaylistsview.cpp b/src/smartplaylists/smartplaylistsview.cpp index 24f818f565..cc518773ff 100644 --- a/src/smartplaylists/smartplaylistsview.cpp +++ b/src/smartplaylists/smartplaylistsview.cpp @@ -23,7 +23,7 @@ #include #include "core/logging.h" -#include "core/mimedata.h" +#include "mimedata/mimedata.h" #include "smartplaylistsmodel.h" #include "smartplaylistsview.h" #include "smartplaylistwizard.h" diff --git a/src/smartplaylists/smartplaylistsviewcontainer.cpp b/src/smartplaylists/smartplaylistsviewcontainer.cpp index 10c9696430..ca13021557 100644 --- a/src/smartplaylists/smartplaylistsviewcontainer.cpp +++ b/src/smartplaylists/smartplaylistsviewcontainer.cpp @@ -25,7 +25,7 @@ #include #include "core/iconloader.h" -#include "core/mimedata.h" +#include "mimedata/mimedata.h" #include "core/settings.h" #include "constants/appearancesettings.h" diff --git a/src/songloader/CMakeLists.txt b/src/songloader/CMakeLists.txt new file mode 100644 index 0000000000..96b43213fc --- /dev/null +++ b/src/songloader/CMakeLists.txt @@ -0,0 +1,33 @@ +set(SONGLOADER_SOURCES songloader.cpp) +set(SONGLOADER_HEADERS songloader.h) + +qt_wrap_cpp(SONGLOADER_SOURCES ${SONGLOADER_HEADERS}) + +add_library(strawberry_songloader STATIC ${SONGLOADER_SOURCES}) + +target_include_directories(strawberry_songloader PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/src + ${CMAKE_BINARY_DIR}/src +) + +target_link_libraries(strawberry_songloader PRIVATE + PkgConfig::GLIB + PkgConfig::GOBJECT + PkgConfig::GSTREAMER + PkgConfig::GSTREAMER_BASE + PkgConfig::GSTREAMER_AUDIO + PkgConfig::GSTREAMER_APP + PkgConfig::GSTREAMER_TAG + PkgConfig::GSTREAMER_PBUTILS + Qt${QT_VERSION_MAJOR}::Core + Qt${QT_VERSION_MAJOR}::Network + Qt${QT_VERSION_MAJOR}::Sql + Qt${QT_VERSION_MAJOR}::Widgets + strawberry_utilities + strawberry_core + strawberry_collection + strawberry_tagreader + strawberry_playlistparsers +) diff --git a/src/core/songloader.cpp b/src/songloader/songloader.cpp similarity index 100% rename from src/core/songloader.cpp rename to src/songloader/songloader.cpp diff --git a/src/core/songloader.h b/src/songloader/songloader.h similarity index 100% rename from src/core/songloader.h rename to src/songloader/songloader.h diff --git a/src/spotify/CMakeLists.txt b/src/spotify/CMakeLists.txt new file mode 100644 index 0000000000..b9bc787269 --- /dev/null +++ b/src/spotify/CMakeLists.txt @@ -0,0 +1,36 @@ +set(SPOTIFY_SOURCES + spotifyservice.cpp + spotifybaserequest.cpp + spotifyrequest.cpp + spotifyfavoriterequest.cpp +) + +set(SPOTIFY_HEADERS + spotifyservice.h + spotifybaserequest.h + spotifyrequest.h + spotifyfavoriterequest.h +) + +qt_wrap_cpp(SPOTIFY_SOURCES ${SPOTIFY_HEADERS}) + +add_library(strawberry_spotify STATIC ${SPOTIFY_SOURCES}) + +target_include_directories(strawberry_spotify PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/src + ${CMAKE_BINARY_DIR}/src +) + +target_link_libraries(strawberry_spotify PRIVATE + Qt${QT_VERSION_MAJOR}::Core + Qt${QT_VERSION_MAJOR}::Network + Qt${QT_VERSION_MAJOR}::Sql + Qt${QT_VERSION_MAJOR}::Gui + Qt${QT_VERSION_MAJOR}::Widgets + strawberry_utilities + strawberry_core + strawberry_streaming + strawberry_collection +) diff --git a/src/streaming/CMakeLists.txt b/src/streaming/CMakeLists.txt new file mode 100644 index 0000000000..8651b5dc28 --- /dev/null +++ b/src/streaming/CMakeLists.txt @@ -0,0 +1,59 @@ +set(STREAMING_SOURCES + streamingservices.cpp + streamingservice.cpp + streamplaylistitem.cpp + streamingsearchview.cpp + streamingsearchmodel.cpp + streamingsearchsortmodel.cpp + streamingsearchitemdelegate.cpp + streamingsongsview.cpp + streamingtabsview.cpp + streamingcollectionview.cpp + streamingcollectionviewcontainer.cpp + streamingsearchview.cpp + streamsongmimedata.cpp +) + +set(STREAMING_HEADERS + streamingservices.h + streamingservice.h + streamsongmimedata.h + streamingsearchmodel.h + streamingsearchsortmodel.h + streamingsearchitemdelegate.h + streamingsearchview.h + streamingsongsview.h + streamingtabsview.h + streamingcollectionview.h + streamingcollectionviewcontainer.h +) + +set(STREAMING_UI + streamingtabsview.ui + streamingcollectionviewcontainer.ui + streamingsearchview.ui +) + +qt_wrap_cpp(STREAMING_SOURCES ${STREAMING_HEADERS}) +qt_wrap_ui(STREAMING_SOURCES ${STREAMING_UI}) + +add_library(strawberry_streaming STATIC ${STREAMING_SOURCES}) + +target_include_directories(strawberry_streaming PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/src + ${CMAKE_BINARY_DIR}/src +) + +target_link_libraries(strawberry_streaming PRIVATE + Qt${QT_VERSION_MAJOR}::Core + Qt${QT_VERSION_MAJOR}::Network + Qt${QT_VERSION_MAJOR}::Sql + Qt${QT_VERSION_MAJOR}::Gui + Qt${QT_VERSION_MAJOR}::Widgets + strawberry_core + strawberry_mimedata + strawberry_collection + strawberry_covermanager +) diff --git a/src/streaming/streamingcollectionview.cpp b/src/streaming/streamingcollectionview.cpp index b0d2cfeca7..c5b1ca6de5 100644 --- a/src/streaming/streamingcollectionview.cpp +++ b/src/streaming/streamingcollectionview.cpp @@ -40,7 +40,7 @@ #include "includes/shared_ptr.h" #include "core/iconloader.h" -#include "core/mimedata.h" +#include "mimedata/mimedata.h" #include "collection/collectionbackend.h" #include "collection/collectionmodel.h" #include "collection/collectionfilterwidget.h" diff --git a/src/streaming/streamingcollectionviewcontainer.h b/src/streaming/streamingcollectionviewcontainer.h index 57fe28a37b..71797aa823 100644 --- a/src/streaming/streamingcollectionviewcontainer.h +++ b/src/streaming/streamingcollectionviewcontainer.h @@ -35,7 +35,7 @@ class QProgressBar; class QContextMenuEvent; class CollectionFilterWidget; -#include "ui_streamingcollectionviewcontainer.h" +#include "streaming/ui_streamingcollectionviewcontainer.h" class StreamingCollectionViewContainer : public QWidget { Q_OBJECT diff --git a/src/streaming/streamingsearchmodel.cpp b/src/streaming/streamingsearchmodel.cpp index 37676d4a75..9c7ea4faf9 100644 --- a/src/streaming/streamingsearchmodel.cpp +++ b/src/streaming/streamingsearchmodel.cpp @@ -31,7 +31,7 @@ #include #include "core/iconloader.h" -#include "core/mimedata.h" +#include "mimedata/mimedata.h" #include "streamsongmimedata.h" #include "streamingservice.h" #include "streamingsearchmodel.h" diff --git a/src/streaming/streamingsearchview.cpp b/src/streaming/streamingsearchview.cpp index 0ab18375a7..9cf07151e8 100644 --- a/src/streaming/streamingsearchview.cpp +++ b/src/streaming/streamingsearchview.cpp @@ -67,7 +67,7 @@ #include "core/song.h" #include "core/iconloader.h" #include "core/settings.h" -#include "core/mimedata.h" +#include "mimedata/mimedata.h" #include "collection/collectionfilterwidget.h" #include "collection/collectionmodel.h" #include "collection/groupbydialog.h" diff --git a/src/streaming/streamingsongsview.h b/src/streaming/streamingsongsview.h index f7a6304a67..55d559e69e 100644 --- a/src/streaming/streamingsongsview.h +++ b/src/streaming/streamingsongsview.h @@ -35,7 +35,7 @@ class QContextMenuEvent; class StreamingService; class StreamingCollectionView; -#include "ui_streamingcollectionviewcontainer.h" +#include "streaming/ui_streamingcollectionviewcontainer.h" class StreamingSongsView : public QWidget { Q_OBJECT diff --git a/src/streaming/streamingtabsview.h b/src/streaming/streamingtabsview.h index 3a268342b7..1aaad5b75c 100644 --- a/src/streaming/streamingtabsview.h +++ b/src/streaming/streamingtabsview.h @@ -31,7 +31,7 @@ #include "streamingcollectionviewcontainer.h" #include "core/song.h" -#include "ui_streamingtabsview.h" +#include "streaming/ui_streamingtabsview.h" class QContextMenuEvent; diff --git a/src/streaming/streamsongmimedata.h b/src/streaming/streamsongmimedata.h index 6b1d5d2a34..b7721815e6 100644 --- a/src/streaming/streamsongmimedata.h +++ b/src/streaming/streamsongmimedata.h @@ -23,7 +23,7 @@ #define STREAMSONGMIMEDATA_H #include "includes/shared_ptr.h" -#include "core/mimedata.h" +#include "mimedata/mimedata.h" #include "core/song.h" class StreamingService; diff --git a/src/subsonic/CMakeLists.txt b/src/subsonic/CMakeLists.txt new file mode 100644 index 0000000000..6be171ef47 --- /dev/null +++ b/src/subsonic/CMakeLists.txt @@ -0,0 +1,34 @@ +set(SUBSONIC_SOURCES + subsonicservice.cpp + subsonicurlhandler.cpp + subsonicbaserequest.cpp + subsonicrequest.cpp + subsonicscrobblerequest.cpp +) + +set(SUBSONIC_HEADERS + subsonicservice.h + subsonicurlhandler.h + subsonicbaserequest.h + subsonicrequest.h + subsonicscrobblerequest.h +) + +qt_wrap_cpp(SUBSONIC_SOURCES ${SUBSONIC_HEADERS}) + +add_library(strawberry_subsonic STATIC ${SUBSONIC_SOURCES}) + +target_include_directories(strawberry_subsonic PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/src + ${CMAKE_BINARY_DIR}/src +) + +target_link_libraries(strawberry_subsonic PRIVATE + Qt${QT_VERSION_MAJOR}::Core + Qt${QT_VERSION_MAJOR}::Network + Qt${QT_VERSION_MAJOR}::Sql + Qt${QT_VERSION_MAJOR}::Gui + Qt${QT_VERSION_MAJOR}::Widgets +) diff --git a/src/systemtrayicon/CMakeLists.txt b/src/systemtrayicon/CMakeLists.txt new file mode 100644 index 0000000000..dcbf21584c --- /dev/null +++ b/src/systemtrayicon/CMakeLists.txt @@ -0,0 +1,26 @@ +set(SYSTEMTRAYICON_SOURCES systemtrayicon.cpp) + +if(APPLE) + list(APPEND SYSTEMTRAYICON_SOURCES macsystemtrayicon.mm) + list(APPEND SYSTEMTRAYICON_HEADERS macsystemtrayicon.h) +else() + list(APPEND SYSTEMTRAYICON_SOURCES qtsystemtrayicon.cpp) + list(APPEND SYSTEMTRAYICON_HEADERS qtsystemtrayicon.h) +endif() + +qt_wrap_cpp(SYSTEMTRAYICON_SOURCES ${SYSTEMTRAYICON_HEADERS}) + +add_library(strawberry_systemtrayicon STATIC ${SYSTEMTRAYICON_SOURCES}) + +target_include_directories(strawberry_systemtrayicon PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/src + ${CMAKE_BINARY_DIR}/src +) + +target_link_libraries(strawberry_systemtrayicon PRIVATE + Qt${QT_VERSION_MAJOR}::Core + Qt${QT_VERSION_MAJOR}::Widgets + strawberry_core +) diff --git a/src/systemtrayicon/macsystemtrayicon.mm b/src/systemtrayicon/macsystemtrayicon.mm index a3c365973c..d56d3a7319 100644 --- a/src/systemtrayicon/macsystemtrayicon.mm +++ b/src/systemtrayicon/macsystemtrayicon.mm @@ -33,7 +33,7 @@ #include "macsystemtrayicon.h" -#include "includes/mac_delegate.h" +#include "macstartup/mac_delegate.h" #include "core/song.h" #include "core/iconloader.h" diff --git a/src/tagreader/CMakeLists.txt b/src/tagreader/CMakeLists.txt new file mode 100644 index 0000000000..90a9ff93d9 --- /dev/null +++ b/src/tagreader/CMakeLists.txt @@ -0,0 +1,48 @@ +set(SOURCES + tagreaderclient.cpp + tagreaderresult.cpp + tagreaderbase.cpp + tagreadertaglib.cpp + tagreadergme.cpp + tagreaderrequest.cpp + tagreaderismediafilerequest.cpp + tagreaderreadfilerequest.cpp + tagreaderwritefilerequest.cpp + tagreaderloadcoverdatarequest.cpp + tagreaderloadcoverimagerequest.cpp + tagreadersavecoverrequest.cpp + tagreadersaveplaycountrequest.cpp + tagreadersaveratingrequest.cpp + albumcovertagdata.cpp + savetagcoverdata.cpp + tagreaderreply.cpp + tagreaderreadfilereply.cpp + tagreaderloadcoverdatareply.cpp + tagreaderloadcoverimagereply.cpp +) + +set(HEADERS + tagreaderclient.h + tagreaderreply.h + tagreaderreadfilereply.h + tagreaderloadcoverdatareply.h + tagreaderloadcoverimagereply.h +) + +qt_wrap_cpp(SOURCES ${HEADERS}) + +add_library(strawberry_tagreader STATIC ${SOURCES}) + +target_include_directories(strawberry_tagreader PRIVATE + ${CMAKE_SOURCE_DIR} + ${CMAKE_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/src + ${CMAKE_BINARY_DIR}/src +) + +target_link_libraries(strawberry_tagreader PRIVATE + ${TAGLIB_LIBRARIES} + Qt${QT_VERSION_MAJOR}::Core + Qt${QT_VERSION_MAJOR}::Gui + strawberry_core +) diff --git a/src/tidal/CMakeLists.txt b/src/tidal/CMakeLists.txt new file mode 100644 index 0000000000..9cbf06418b --- /dev/null +++ b/src/tidal/CMakeLists.txt @@ -0,0 +1,42 @@ +set(TIDAL_SOURCES + tidalservice.cpp + tidalurlhandler.cpp + tidalbaserequest.cpp + tidalrequest.cpp + tidalstreamurlrequest.cpp + tidalfavoriterequest.cpp +) + +set(TIDAL_HEADERS + tidalservice.h + tidalurlhandler.h + tidalbaserequest.h + tidalrequest.h + tidalstreamurlrequest.h + tidalfavoriterequest.h +) + +qt_wrap_cpp(TIDAL_SOURCES ${TIDAL_HEADERS}) +qt_wrap_ui(TIDAL_SOURCES ${TIDAL_UI}) + +add_library(strawberry_tidal STATIC ${TIDAL_SOURCES}) + +target_include_directories(strawberry_tidal PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/src + ${CMAKE_BINARY_DIR}/src +) + +target_link_libraries(strawberry_tidal PRIVATE + Qt${QT_VERSION_MAJOR}::Core + Qt${QT_VERSION_MAJOR}::Network + Qt${QT_VERSION_MAJOR}::Sql + Qt${QT_VERSION_MAJOR}::Gui + Qt${QT_VERSION_MAJOR}::Widgets + strawberry_utilities + strawberry_core + strawberry_streaming + strawberry_collection + strawberry_covermanager +) diff --git a/src/transcoder/CMakeLists.txt b/src/transcoder/CMakeLists.txt new file mode 100644 index 0000000000..fc4ccacb75 --- /dev/null +++ b/src/transcoder/CMakeLists.txt @@ -0,0 +1,71 @@ +set(TRANSCODER_SOURCES + transcoder.cpp + transcoderoptionsinterface.cpp + transcodedialog.cpp + transcoderoptionsdialog.cpp + transcoderoptionsflac.cpp + transcoderoptionswavpack.cpp + transcoderoptionsvorbis.cpp + transcoderoptionsopus.cpp + transcoderoptionsspeex.cpp + transcoderoptionsaac.cpp + transcoderoptionsasf.cpp + transcoderoptionsmp3.cpp +) + +set(TRANSCODER_HEADERS + transcoder.h + transcodedialog.h + transcoderoptionsdialog.h + transcoderoptionsinterface.h + transcoderoptionsflac.h + transcoderoptionswavpack.h + transcoderoptionsvorbis.h + transcoderoptionsopus.h + transcoderoptionsspeex.h + transcoderoptionsaac.h + transcoderoptionsasf.h + transcoderoptionsmp3.h +) + +set(TRANSCODER_UI + transcodedialog.ui + transcodelogdialog.ui + transcoderoptionsaac.ui + transcoderoptionsdialog.ui + transcoderoptionsflac.ui + transcoderoptionswavpack.ui + transcoderoptionsvorbis.ui + transcoderoptionsopus.ui + transcoderoptionsspeex.ui + transcoderoptionsasf.ui + transcoderoptionsmp3.ui +) + +qt_wrap_cpp(TRANSCODER_SOURCES ${TRANSCODER_HEADERS}) +qt_wrap_ui(TRANSCODER_SOURCES ${TRANSCODER_UI}) + +add_library(strawberry_transcoder STATIC ${TRANSCODER_SOURCES}) + +target_include_directories(strawberry_transcoder PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/src + ${CMAKE_BINARY_DIR}/src +) + +target_link_libraries(strawberry_transcoder PRIVATE + PkgConfig::GLIB + PkgConfig::GOBJECT + PkgConfig::GSTREAMER + PkgConfig::GSTREAMER_BASE + PkgConfig::GSTREAMER_AUDIO + PkgConfig::GSTREAMER_APP + PkgConfig::GSTREAMER_TAG + PkgConfig::GSTREAMER_PBUTILS + Qt${QT_VERSION_MAJOR}::Core + Qt${QT_VERSION_MAJOR}::Gui + Qt${QT_VERSION_MAJOR}::Widgets + strawberry_core + strawberry_utilities +) diff --git a/src/transcoder/transcodedialog.cpp b/src/transcoder/transcodedialog.cpp index 127349fa9d..7c26dd053c 100644 --- a/src/transcoder/transcodedialog.cpp +++ b/src/transcoder/transcodedialog.cpp @@ -64,8 +64,8 @@ #include "transcodedialog.h" #include "transcoder.h" #include "transcoderoptionsdialog.h" -#include "ui_transcodedialog.h" -#include "ui_transcodelogdialog.h" +#include "transcoder/ui_transcodedialog.h" +#include "transcoder/ui_transcodelogdialog.h" using namespace Qt::Literals::StringLiterals; diff --git a/src/transcoder/transcoderoptionsaac.cpp b/src/transcoder/transcoderoptionsaac.cpp index 85fd4c06be..59f16a801e 100644 --- a/src/transcoder/transcoderoptionsaac.cpp +++ b/src/transcoder/transcoderoptionsaac.cpp @@ -28,7 +28,7 @@ #include "transcoderoptionsinterface.h" #include "transcoderoptionsaac.h" -#include "ui_transcoderoptionsaac.h" +#include "transcoder/ui_transcoderoptionsaac.h" #include "core/settings.h" diff --git a/src/transcoder/transcoderoptionsasf.cpp b/src/transcoder/transcoderoptionsasf.cpp index bd7b014089..6329a61570 100644 --- a/src/transcoder/transcoderoptionsasf.cpp +++ b/src/transcoder/transcoderoptionsasf.cpp @@ -27,7 +27,7 @@ #include "transcoderoptionsinterface.h" #include "transcoderoptionsasf.h" -#include "ui_transcoderoptionsasf.h" +#include "transcoder/ui_transcoderoptionsasf.h" #include "core/settings.h" diff --git a/src/transcoder/transcoderoptionsdialog.cpp b/src/transcoder/transcoderoptionsdialog.cpp index b9691e766b..eeefe6537d 100644 --- a/src/transcoder/transcoderoptionsdialog.cpp +++ b/src/transcoder/transcoderoptionsdialog.cpp @@ -37,7 +37,7 @@ #include "transcoderoptionsasf.h" #include "transcoderoptionsaac.h" #include "transcoderoptionsmp3.h" -#include "ui_transcoderoptionsdialog.h" +#include "transcoder/ui_transcoderoptionsdialog.h" TranscoderOptionsDialog::TranscoderOptionsDialog(Song::FileType type, QWidget *parent) : QDialog(parent), diff --git a/src/transcoder/transcoderoptionsflac.cpp b/src/transcoder/transcoderoptionsflac.cpp index fc6293f61f..714b6e2476 100644 --- a/src/transcoder/transcoderoptionsflac.cpp +++ b/src/transcoder/transcoderoptionsflac.cpp @@ -27,7 +27,7 @@ #include "transcoderoptionsinterface.h" #include "transcoderoptionsflac.h" -#include "ui_transcoderoptionsflac.h" +#include "transcoder/ui_transcoderoptionsflac.h" #include "core/settings.h" diff --git a/src/transcoder/transcoderoptionsmp3.cpp b/src/transcoder/transcoderoptionsmp3.cpp index 398d6e6503..a47660ec26 100644 --- a/src/transcoder/transcoderoptionsmp3.cpp +++ b/src/transcoder/transcoderoptionsmp3.cpp @@ -31,7 +31,7 @@ #include "transcoderoptionsinterface.h" #include "transcoderoptionsmp3.h" -#include "ui_transcoderoptionsmp3.h" +#include "transcoder/ui_transcoderoptionsmp3.h" #include "core/settings.h" diff --git a/src/transcoder/transcoderoptionsopus.cpp b/src/transcoder/transcoderoptionsopus.cpp index 4e35ad59cd..f366814a28 100644 --- a/src/transcoder/transcoderoptionsopus.cpp +++ b/src/transcoder/transcoderoptionsopus.cpp @@ -27,7 +27,7 @@ #include "transcoderoptionsinterface.h" #include "transcoderoptionsopus.h" -#include "ui_transcoderoptionsopus.h" +#include "transcoder/ui_transcoderoptionsopus.h" #include "core/settings.h" diff --git a/src/transcoder/transcoderoptionsspeex.cpp b/src/transcoder/transcoderoptionsspeex.cpp index 2aee551010..86fa705213 100644 --- a/src/transcoder/transcoderoptionsspeex.cpp +++ b/src/transcoder/transcoderoptionsspeex.cpp @@ -30,7 +30,7 @@ #include "transcoderoptionsinterface.h" #include "transcoderoptionsspeex.h" -#include "ui_transcoderoptionsspeex.h" +#include "transcoder/ui_transcoderoptionsspeex.h" #include "core/settings.h" diff --git a/src/transcoder/transcoderoptionsvorbis.cpp b/src/transcoder/transcoderoptionsvorbis.cpp index 5f081d42b6..ece7a299d8 100644 --- a/src/transcoder/transcoderoptionsvorbis.cpp +++ b/src/transcoder/transcoderoptionsvorbis.cpp @@ -28,7 +28,7 @@ #include "transcoderoptionsinterface.h" #include "transcoderoptionsvorbis.h" -#include "ui_transcoderoptionsvorbis.h" +#include "transcoder/ui_transcoderoptionsvorbis.h" #include "core/settings.h" diff --git a/src/transcoder/transcoderoptionswavpack.cpp b/src/transcoder/transcoderoptionswavpack.cpp index c3c4d25eb7..f932d415bd 100644 --- a/src/transcoder/transcoderoptionswavpack.cpp +++ b/src/transcoder/transcoderoptionswavpack.cpp @@ -25,7 +25,7 @@ #include "transcoderoptionsinterface.h" #include "transcoderoptionswavpack.h" -#include "ui_transcoderoptionswavpack.h" +#include "transcoder/ui_transcoderoptionswavpack.h" #include "core/settings.h" diff --git a/src/translations/CMakeLists.txt b/src/translations/CMakeLists.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/utilities/CMakeLists.txt b/src/utilities/CMakeLists.txt new file mode 100644 index 0000000000..c06fd764e9 --- /dev/null +++ b/src/utilities/CMakeLists.txt @@ -0,0 +1,49 @@ +set(UTILITIES_SOURCES + strutils.cpp + envutils.cpp + colorutils.cpp + cryptutils.cpp + fileutils.cpp + diskutils.cpp + imageutils.cpp + macaddrutils.cpp + mimeutils.cpp + randutils.cpp + threadutils.cpp + timeutils.cpp + transliterate.cpp + xmlutils.cpp + filemanagerutils.cpp + coverutils.cpp + coveroptions.cpp + screenutils.cpp + textencodingutils.cpp +) + +if(APPLE) + list(APPEND UTILITIES_SOURCES macosutils.mm) +endif() + +if(WIN32) + list(APPEND UTILITIES_SOURCES scopedwchararray.cpp winutils.cpp) +endif() + +add_library(strawberry_utilities STATIC ${UTILITIES_SOURCES}) + +target_include_directories(strawberry_utilities PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/src + ${CMAKE_BINARY_DIR}/src +) + +target_link_libraries(strawberry_utilities PRIVATE + ICU::uc + ICU::i18n + Qt${QT_VERSION_MAJOR}::Core + Qt${QT_VERSION_MAJOR}::Concurrent + Qt${QT_VERSION_MAJOR}::Network + Qt${QT_VERSION_MAJOR}::Gui + Qt${QT_VERSION_MAJOR}::Widgets + $<$:dwmapi> +) diff --git a/src/widgets/CMakeLists.txt b/src/widgets/CMakeLists.txt new file mode 100644 index 0000000000..b7fbaa9242 --- /dev/null +++ b/src/widgets/CMakeLists.txt @@ -0,0 +1,91 @@ +set(WIDGETS_SOURCES + autoexpandingtreeview.cpp + busyindicator.cpp + clickablelabel.cpp + fancytabwidget.cpp + fancytabbar.cpp + fancytabdata.cpp + favoritewidget.cpp + forcescrollperpixel.cpp + freespacebar.cpp + groupediconview.cpp + lineedit.cpp + linetextedit.cpp + multiloadingindicator.cpp + playingwidget.cpp + renametablineedit.cpp + sliderslider.cpp + prettyslider.cpp + volumeslider.cpp + stickyslider.cpp + stretchheaderview.cpp + trackslider.cpp + tracksliderpopup.cpp + tracksliderslider.cpp + loginstatewidget.cpp + ratingwidget.cpp + resizabletextedit.cpp +) + +set(WIDGETS_HEADERS + autoexpandingtreeview.h + busyindicator.h + clickablelabel.h + fancytabwidget.h + fancytabbar.h + fancytabdata.h + favoritewidget.h + freespacebar.h + groupediconview.h + lineedit.h + linetextedit.h + multiloadingindicator.h + playingwidget.h + renametablineedit.h + sliderslider.h + prettyslider.h + volumeslider.h + stickyslider.h + stretchheaderview.h + trackslider.h + tracksliderpopup.h + tracksliderslider.h + loginstatewidget.h + searchfield.h + ratingwidget.h + forcescrollperpixel.h + resizabletextedit.h +) + +set(WIDGETS_UI + trackslider.ui + loginstatewidget.ui +) + +if(APPLE) + list(APPEND WIDGETS_SOURCES searchfield_mac.mm) +else() + list(APPEND WIDGETS_SOURCES searchfield_qt.cpp searchfield_qt_private.cpp) + list(APPEND WIDGETS_HEADERS searchfield_qt_private.h) +endif() + +qt_wrap_cpp(WIDGETS_SOURCES ${WIDGETS_HEADERS}) +qt_wrap_ui(WIDGETS_SOURCES ${WIDGETS_UI}) + +add_library(strawberry_widgets STATIC ${WIDGETS_SOURCES}) + +target_include_directories(strawberry_widgets PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/src + ${CMAKE_BINARY_DIR}/src +) + +target_link_libraries(strawberry_widgets PRIVATE + Qt${QT_VERSION_MAJOR}::Core + Qt${QT_VERSION_MAJOR}::Widgets + strawberry_utilities + strawberry_core + strawberry_mimedata + strawberry_covermanager +) diff --git a/src/widgets/autoexpandingtreeview.cpp b/src/widgets/autoexpandingtreeview.cpp index 323c332d97..98b103a056 100644 --- a/src/widgets/autoexpandingtreeview.cpp +++ b/src/widgets/autoexpandingtreeview.cpp @@ -27,7 +27,7 @@ #include #include "autoexpandingtreeview.h" -#include "core/mimedata.h" +#include "mimedata/mimedata.h" namespace { constexpr int kRowsToShow = 50; diff --git a/src/widgets/loginstatewidget.cpp b/src/widgets/loginstatewidget.cpp index 3f1328978f..cb256eb645 100644 --- a/src/widgets/loginstatewidget.cpp +++ b/src/widgets/loginstatewidget.cpp @@ -19,7 +19,7 @@ */ #include "loginstatewidget.h" -#include "ui_loginstatewidget.h" +#include "widgets/ui_loginstatewidget.h" #include "core/iconloader.h" #include diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 4a5ade8769..a029ef60ed 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -46,7 +46,7 @@ target_link_libraries(test_main PRIVATE PkgConfig::GSTREAMER_BASE Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Widgets - strawberry_lib + strawberry_core ) add_library(test_gui_main STATIC EXCLUDE_FROM_ALL ${TEST-RESOURCE-SOURCES} src/main.cpp) @@ -61,14 +61,22 @@ target_link_libraries(test_gui_main PRIVATE PkgConfig::GSTREAMER_BASE Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Widgets - strawberry_lib + strawberry_core ) set_target_properties(test_gui_main PROPERTIES COMPILE_DEFINITIONS GUI) # Given a file foo_test.cpp, creates a target foo_test and adds it to the test target. -macro(add_test_file test_source gui_required) - get_filename_component(TEST_NAME ${test_source} NAME_WE) - add_executable(${TEST_NAME} EXCLUDE_FROM_ALL ${test_source}) +macro(add_test_file gui_required) + + parse_arguments(ADD_TEST_FILE + "SOURCES;HEADERS;LIBRARIES" + "" + ${ARGN} + ) + + get_filename_component(TEST_NAME ${ADD_TEST_FILE_SOURCES} NAME_WE) + + add_executable(${TEST_NAME} EXCLUDE_FROM_ALL ${ADD_TEST_FILE_SOURCES}) target_include_directories(${TEST_NAME} PRIVATE ${CMAKE_BINARY_DIR}/src ${CMAKE_SOURCE_DIR}/src @@ -84,6 +92,7 @@ macro(add_test_file test_source gui_required) Qt${QT_VERSION_MAJOR}::Sql Qt${QT_VERSION_MAJOR}::Test Qt${QT_VERSION_MAJOR}::Widgets + ${ADD_TEST_FILE_LIBRARIES} ) target_link_libraries(${TEST_NAME} PRIVATE test_utils) set(GUI_REQUIRED ${gui_required}) @@ -96,17 +105,44 @@ macro(add_test_file test_source gui_required) add_test(strawberry_tests ${TEST_NAME}) add_custom_command(TARGET strawberry_tests POST_BUILD COMMAND ./${TEST_NAME}${CMAKE_EXECUTABLE_SUFFIX}) add_dependencies(build_tests ${TEST_NAME}) -endmacro(add_test_file) - -add_test_file(src/utilities_test.cpp false) -add_test_file(src/concurrentrun_test.cpp false) -add_test_file(src/mergedproxymodel_test.cpp false) -add_test_file(src/sqlite_test.cpp false) -add_test_file(src/tagreader_test.cpp false) -add_test_file(src/collectionbackend_test.cpp false) -add_test_file(src/collectionmodel_test.cpp true) -add_test_file(src/songplaylistitem_test.cpp false) -add_test_file(src/organizeformat_test.cpp false) -add_test_file(src/playlist_test.cpp true) +endmacro() + +add_test_file(FALSE + SOURCES src/utilities_test.cpp + LIBRARIES strawberry_core strawberry_utilities +) + +add_test_file(FALSE SOURCES src/concurrentrun_test.cpp) + +add_test_file(FALSE SOURCES src/mergedproxymodel_test.cpp) + +add_test_file(FALSE SOURCES src/sqlite_test.cpp) + +add_test_file(FALSE SOURCES src/tagreader_test.cpp LIBRARIES strawberry_tagreader) + +add_test_file(FALSE + SOURCES src/collectionbackend_test.cpp + LIBRARIES strawberry_tagreader strawberry_collection +) + +add_test_file(TRUE + SOURCES src/collectionmodel_test.cpp + LIBRARIES strawberry_tagreader strawberry_collection +) + +add_test_file(FALSE + SOURCES src/songplaylistitem_test.cpp + LIBRARIES strawberry_playlist +) + +add_test_file(FALSE + SOURCES src/organizeformat_test.cpp + LIBRARIES strawberry_organize +) + +add_test_file(TRUE + SOURCES src/playlist_test.cpp + LIBRARIES strawberry_playlist +) add_custom_target(run_strawberry_tests COMMAND ${CMAKE_CTEST_COMMAND} -V DEPENDS strawberry_tests) diff --git a/tests/src/metatypes_env.h b/tests/src/metatypes_env.h index 61cdf1fe28..130e76a3fb 100644 --- a/tests/src/metatypes_env.h +++ b/tests/src/metatypes_env.h @@ -27,7 +27,7 @@ #include #include "core/song.h" -#include "core/songloader.h" +#include "songloader/songloader.h" #include "collection/collectiondirectory.h" class MetatypesEnvironment : public ::testing::Environment {