Skip to content

Commit

Permalink
Split into separate libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
jonaski committed Nov 1, 2024
1 parent e83b521 commit 90d6447
Show file tree
Hide file tree
Showing 130 changed files with 2,555 additions and 1,190 deletions.
1,173 changes: 73 additions & 1,100 deletions CMakeLists.txt

Large diffs are not rendered by default.

69 changes: 69 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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()
41 changes: 41 additions & 0 deletions src/analyzer/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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
)
82 changes: 82 additions & 0 deletions src/collection/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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
)
2 changes: 1 addition & 1 deletion src/collection/collectionfilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include <QUrl>

#include "core/song.h"
#include "core/songmimedata.h"
#include "mimedata/songmimedata.h"
#include "filterparser/filterparser.h"
#include "filterparser/filtertree.h"
#include "collectionbackend.h"
Expand Down
2 changes: 1 addition & 1 deletion src/collection/collectionfilterwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src/collection/collectionmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions src/collection/collectionview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
#include <QContextMenuEvent>

#include "core/iconloader.h"
#include "core/mimedata.h"
#include "mimedata/mimedata.h"
#include "core/musicstorage.h"
#include "core/deletefiles.h"
#include "core/settings.h"
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src/collection/collectionviewcontainer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {

Expand Down
32 changes: 32 additions & 0 deletions src/context/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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
)
95 changes: 95 additions & 0 deletions src/core/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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
$<$<BOOL:${HAVE_DBUS}>:Qt${QT_VERSION_MAJOR}::DBus>
Qt${QT_VERSION_MAJOR}::Gui
Qt${QT_VERSION_MAJOR}::Widgets
$<$<BOOL:${HAVE_GPOD}>:PkgConfig::LIBGPOD PkgConfig::GDK_PIXBUF>
$<$<BOOL:${WIN32}>:getopt-win::getopt>
strawberry_utilities
)
Loading

0 comments on commit 90d6447

Please sign in to comment.