Add cmake option for Ubuntu One.

This commit is contained in:
John Maguire 2012-11-28 16:51:19 +01:00
parent 9c7a3ab105
commit ffc8d53cdb
4 changed files with 27 additions and 11 deletions

View File

@ -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
)

View File

@ -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

View File

@ -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

View File

@ -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) {