Signed-off-by: Anton Lundin <[email protected]>
---
 CMakeLists.txt                 | 8 ++++++--
 desktop-widgets/mainwindow.cpp | 4 +++-
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7adb2ce..3d22722 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -26,6 +26,10 @@ option(FTDISUPPORT "enable support for libftdi based serial" 
OFF)
 option(DISABLE_PLUGINS "disable support for social media plugins" OFF)
 option(SMARTTRAK_IMPORT "enable building SmartTrak divelogs import tool 
(requires glib2 and libmdb)" OFF)
 
+if (NOT FBSUPPORT)
+       set(DISABLE_PLUGINS ON)
+endif()
+
 add_definitions(-DSUBSURFACE_SOURCE="${CMAKE_SOURCE_DIR}")
 
 set(CMAKE_MODULE_PATH
@@ -344,9 +348,9 @@ endif()
 
 if(FBSUPPORT)
        add_definitions(-DFBSUPPORT)
+       set(FACEBOOK_INTEGRATION facebook_integration)
 endif()
 
-
 # add pthread to the end of the library list on Linux
 # this is only needed on Ubuntu (why do these idiots break everything?)
 # but shouldn't hurt on other Linux versions
@@ -407,7 +411,7 @@ else()
                ${SUBSURFACE_TARGET}
                subsurface_generated_ui
                subsurface_interface
-               facebook_integration
+               ${FACEBOOK_INTEGRATION}
                subsurface_profile
                subsurface_statistics
                subsurface_models
diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp
index 11d5fb1..67666a6 100644
--- a/desktop-widgets/mainwindow.cpp
+++ b/desktop-widgets/mainwindow.cpp
@@ -56,9 +56,9 @@
 #include "subsurface-core/isocialnetworkintegration.h"
 #include "subsurface-core/pluginmanager.h"
 
+#if defined(FBSUPPORT)
 #include "plugins/facebook/facebook_integration.h"
 
-#if defined(FBSUPPORT)
 #include "socialnetworks.h"
 #endif
 
@@ -262,6 +262,7 @@ MainWindow::~MainWindow()
 
 void MainWindow::setupSocialNetworkMenu()
 {
+#ifdef FBSUPPORT
        QMenu *connections = new QMenu(tr("Connect to"));
        FacebookPlugin *facebookPlugin = new FacebookPlugin();
        QAction *toggle_connection = new QAction(this);
@@ -281,6 +282,7 @@ void MainWindow::setupSocialNetworkMenu()
        ui.menuShare_on->addSeparator();
        ui.menuShare_on->addMenu(connections);
        ui.menubar->show();
+#endif
 }
 
 void MainWindow::socialNetworkRequestConnect()
-- 
2.5.0

_______________________________________________
subsurface mailing list
[email protected]
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to