diff --git a/CMakeLists.txt b/CMakeLists.txt index f032e0a48..6cb3b42f0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -193,6 +193,11 @@ optional_component(GOOGLE_DRIVE ON "Google Drive support" DEPENDS "Taglib 1.8" "TAGLIB_VERSION VERSION_GREATER 1.7.999" ) +optional_component(UBUNTU_ONE ON "Ubuntu One file support" + DEPENDS "Google sparsehash" SPARSEHASH_INCLUDE_DIRS + DEPENDS "Taglib 1.8" "TAGLIB_VERSION VERSION_GREATER 1.7.999" +) + optional_component(AUDIOCD ON "Devices: Audio CD support" DEPENDS "libcdio" CDIO_FOUND ) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 4dcc7a293..e025e7523 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -191,10 +191,6 @@ set(SOURCES internet/somafmservice.cpp internet/somafmurlhandler.cpp internet/soundcloudservice.cpp - internet/ubuntuoneauthenticator.cpp - internet/ubuntuoneservice.cpp - internet/ubuntuonesettingspage.cpp - internet/ubuntuoneurlhandler.cpp library/groupbydialog.cpp library/library.cpp @@ -470,10 +466,6 @@ set(HEADERS internet/somafmservice.h internet/somafmurlhandler.h internet/soundcloudservice.h - internet/ubuntuoneauthenticator.h - internet/ubuntuoneservice.h - internet/ubuntuonesettingspage.h - internet/ubuntuoneurlhandler.h library/groupbydialog.h library/library.h @@ -649,7 +641,6 @@ set(UI internet/magnatunesettingspage.ui internet/searchboxwidget.ui internet/spotifysettingspage.ui - internet/ubuntuonesettingspage.ui library/groupbydialog.ui library/libraryfilterwidget.ui @@ -1047,6 +1038,22 @@ optional_source(HAVE_GOOGLE_DRIVE internet/googledrivesettingspage.ui ) +# Ubuntu One file support +optional_source(HAVE_UBUNTU_ONE + SOURCES + internet/ubuntuoneauthenticator.cpp + internet/ubuntuoneservice.cpp + internet/ubuntuonesettingspage.cpp + internet/ubuntuoneurlhandler.cpp + HEADERS + internet/ubuntuoneauthenticator.h + internet/ubuntuoneservice.h + internet/ubuntuonesettingspage.h + internet/ubuntuoneurlhandler.h + UI + internet/ubuntuonesettingspage.ui +) + # Hack to add Clementine to the Unity system tray whitelist optional_source(LINUX SOURCES core/ubuntuunityhack.cpp diff --git a/src/config.h.in b/src/config.h.in index 7b85e6355..65d3b7f01 100644 --- a/src/config.h.in +++ b/src/config.h.in @@ -39,6 +39,7 @@ #cmakedefine HAVE_SPOTIFY #cmakedefine HAVE_SPOTIFY_DOWNLOADER #cmakedefine HAVE_STATIC_SQLITE +#cmakedefine HAVE_UBUNTU_ONE #cmakedefine HAVE_WIIMOTEDEV #cmakedefine IMOBILEDEVICE_USES_UDIDS #cmakedefine USE_INSTALL_PREFIX diff --git a/src/internet/internetmodel.cpp b/src/internet/internetmodel.cpp index 07bbb4a9b..771e97ff8 100644 --- a/src/internet/internetmodel.cpp +++ b/src/internet/internetmodel.cpp @@ -45,8 +45,9 @@ #ifdef HAVE_GOOGLE_DRIVE #include "googledriveservice.h" #endif - -#include "ubuntuoneservice.h" +#ifdef HAVE_UBUNTU_ONE + #include "ubuntuoneservice.h" +#endif using smart_playlists::Generator; using smart_playlists::GeneratorMimeData; @@ -87,7 +88,9 @@ InternetModel::InternetModel(Application* app, QObject* parent) #ifdef HAVE_SPOTIFY AddService(new SpotifyService(app, this)); #endif +#ifdef HAVE_UBUNTU_ONE AddService(new UbuntuOneService(app, this)); +#endif } void InternetModel::AddService(InternetService *service) {