diff --git a/CMakeLists.txt b/CMakeLists.txt index d97e60001..19a7612e0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,7 @@ if (POLICY CMP0074) endif() # TODO: fix the macOS bundle stuff -if(POLICY CMP0080) +if (POLICY CMP0080) cmake_policy(SET CMP0080 OLD) endif() diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index bb3f3f78f..647bc6691 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -20,14 +20,43 @@ add_library(qbt_gui STATIC hidabletabwidget.h ipsubnetwhitelistoptionsdialog.h lineedit.h + log/logfiltermodel.h + log/loglistview.h + log/logmodel.h mainwindow.h optionsdialog.h + powermanagement/powermanagement.h previewlistdelegate.h previewselectdialog.h private/fspathedit_p.h private/tristatewidget.h + properties/downloadedpiecesbar.h + properties/peerlistdelegate.h + properties/peerlistsortmodel.h + properties/peerlistwidget.h + properties/peersadditiondialog.h + properties/pieceavailabilitybar.h + properties/piecesbar.h + properties/propertieswidget.h + properties/proplistdelegate.h + properties/proptabbar.h + properties/speedplotview.h + properties/speedwidget.h + properties/trackerlistwidget.h + properties/trackersadditiondialog.h raisedmessagebox.h + rss/articlelistwidget.h + rss/automatedrssdownloader.h + rss/feedlistwidget.h + rss/htmlbrowser.h + rss/rsswidget.h scanfoldersdelegate.h + search/pluginselectdialog.h + search/pluginsourcedialog.h + search/searchjobwidget.h + search/searchlistdelegate.h + search/searchsortmodel.h + search/searchwidget.h shutdownconfirmdialog.h speedlimitdialog.h statsdialog.h @@ -72,14 +101,43 @@ add_library(qbt_gui STATIC hidabletabwidget.cpp ipsubnetwhitelistoptionsdialog.cpp lineedit.cpp + log/logfiltermodel.cpp + log/loglistview.cpp + log/logmodel.cpp mainwindow.cpp optionsdialog.cpp + powermanagement/powermanagement.cpp previewlistdelegate.cpp previewselectdialog.cpp private/fspathedit_p.cpp private/tristatewidget.cpp + properties/downloadedpiecesbar.cpp + properties/peerlistdelegate.cpp + properties/peerlistsortmodel.cpp + properties/peerlistwidget.cpp + properties/peersadditiondialog.cpp + properties/pieceavailabilitybar.cpp + properties/piecesbar.cpp + properties/propertieswidget.cpp + properties/proplistdelegate.cpp + properties/proptabbar.cpp + properties/speedplotview.cpp + properties/speedwidget.cpp + properties/trackerlistwidget.cpp + properties/trackersadditiondialog.cpp raisedmessagebox.cpp + rss/articlelistwidget.cpp + rss/automatedrssdownloader.cpp + rss/feedlistwidget.cpp + rss/htmlbrowser.cpp + rss/rsswidget.cpp scanfoldersdelegate.cpp + search/pluginselectdialog.cpp + search/pluginsourcedialog.cpp + search/searchjobwidget.cpp + search/searchlistdelegate.cpp + search/searchsortmodel.cpp + search/searchwidget.cpp shutdownconfirmdialog.cpp speedlimitdialog.cpp statsdialog.cpp @@ -119,6 +177,14 @@ add_library(qbt_gui STATIC mainwindow.ui optionsdialog.ui previewselectdialog.ui + properties/peersadditiondialog.ui + properties/propertieswidget.ui + properties/trackersadditiondialog.ui + rss/automatedrssdownloader.ui + rss/rsswidget.ui + search/pluginselectdialog.ui + search/pluginsourcedialog.ui + search/searchwidget.ui shutdownconfirmdialog.ui speedlimitdialog.ui statsdialog.ui @@ -135,15 +201,21 @@ if (WIN32 OR APPLE) target_sources(qbt_gui PRIVATE programupdater.h programupdater.cpp) endif() -add_subdirectory(log) -add_subdirectory(properties) -add_subdirectory(powermanagement) -add_subdirectory(rss) -add_subdirectory(search) - if (UNIX AND Qt5DBus_FOUND) - add_subdirectory(qtnotify) - target_link_libraries(qbt_gui PRIVATE Qt5::DBus) + target_link_libraries(qbt_gui PRIVATE Qt5::DBus) + + target_sources(qbt_gui PRIVATE + qtnotify/notifications.h + qtnotify/notifications.cpp + ) + + find_package(X11) + if (X11_FOUND) + target_sources(qbt_gui PRIVATE + powermanagement/powermanagement_x11.h + powermanagement/powermanagement_x11.cpp + ) + endif() endif() target_link_libraries(qbt_gui diff --git a/src/gui/log/CMakeLists.txt b/src/gui/log/CMakeLists.txt deleted file mode 100644 index e229e4e5a..000000000 --- a/src/gui/log/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -target_sources(qbt_gui PRIVATE - # headers - logfiltermodel.h - loglistview.h - logmodel.h - - #sources - logfiltermodel.cpp - loglistview.cpp - logmodel.cpp -) diff --git a/src/gui/powermanagement/CMakeLists.txt b/src/gui/powermanagement/CMakeLists.txt deleted file mode 100644 index fa9abf3d8..000000000 --- a/src/gui/powermanagement/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -target_sources(qbt_gui PRIVATE powermanagement.h powermanagement.cpp) - -if (UNIX AND Qt5DBus_FOUND) - find_package(X11) - if (X11_FOUND) - target_sources(qbt_gui PRIVATE powermanagement_x11.h powermanagement_x11.cpp) - endif() -endif() diff --git a/src/gui/properties/CMakeLists.txt b/src/gui/properties/CMakeLists.txt deleted file mode 100644 index 58fd5b522..000000000 --- a/src/gui/properties/CMakeLists.txt +++ /dev/null @@ -1,38 +0,0 @@ -target_sources(qbt_gui PRIVATE - # headers - downloadedpiecesbar.h - peerlistdelegate.h - peerlistsortmodel.h - peerlistwidget.h - peersadditiondialog.h - pieceavailabilitybar.h - piecesbar.h - propertieswidget.h - proplistdelegate.h - proptabbar.h - speedplotview.h - speedwidget.h - trackerlistwidget.h - trackersadditiondialog.h - - # sources - downloadedpiecesbar.cpp - peerlistdelegate.cpp - peerlistsortmodel.cpp - peerlistwidget.cpp - peersadditiondialog.cpp - pieceavailabilitybar.cpp - piecesbar.cpp - propertieswidget.cpp - proplistdelegate.cpp - proptabbar.cpp - speedplotview.cpp - speedwidget.cpp - trackerlistwidget.cpp - trackersadditiondialog.cpp - - # forms - peersadditiondialog.ui - propertieswidget.ui - trackersadditiondialog.ui -) diff --git a/src/gui/qtnotify/CMakeLists.txt b/src/gui/qtnotify/CMakeLists.txt deleted file mode 100644 index d859d85ae..000000000 --- a/src/gui/qtnotify/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -target_sources(qbt_gui PRIVATE notifications.h notifications.cpp) diff --git a/src/gui/rss/CMakeLists.txt b/src/gui/rss/CMakeLists.txt deleted file mode 100644 index 0d24c8535..000000000 --- a/src/gui/rss/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -target_sources(qbt_gui PRIVATE - # headers - articlelistwidget.h - automatedrssdownloader.h - feedlistwidget.h - htmlbrowser.h - rsswidget.h - - #sources - articlelistwidget.cpp - automatedrssdownloader.cpp - feedlistwidget.cpp - htmlbrowser.cpp - rsswidget.cpp - - # forms - automatedrssdownloader.ui - rsswidget.ui -) diff --git a/src/gui/search/CMakeLists.txt b/src/gui/search/CMakeLists.txt deleted file mode 100644 index d80b420fd..000000000 --- a/src/gui/search/CMakeLists.txt +++ /dev/null @@ -1,22 +0,0 @@ -target_sources(qbt_gui PRIVATE - # headers - pluginselectdialog.h - pluginsourcedialog.h - searchjobwidget.h - searchlistdelegate.h - searchsortmodel.h - searchwidget.h - - # sources - pluginselectdialog.cpp - pluginsourcedialog.cpp - searchjobwidget.cpp - searchlistdelegate.cpp - searchsortmodel.cpp - searchwidget.cpp - - # forms - pluginselectdialog.ui - pluginsourcedialog.ui - searchwidget.ui -)