aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2015-12-17 17:14:13 -0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-12-17 11:48:15 -0800
commit13573915b686cd327ad61e611e87f5677b60174e (patch)
tree624e7f90769a60db560c33e831eb36bea94a7bfc
parent8abbcc55983ba5f9a0b2cd88b11be6ff6acc7b6a (diff)
downloadsubsurface-13573915b686cd327ad61e611e87f5677b60174e.tar.gz
Fix CMake to not add Facebook on Android
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--CMakeLists.txt6
-rw-r--r--desktop-widgets/plugins/facebook/CMakeLists.txt33
2 files changed, 19 insertions, 20 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 989e8610b..7bf638399 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -129,7 +129,6 @@ elseif(${SUBSURFACE_TARGET_EXECUTABLE} MATCHES "MobileExecutable")
endif()
if(ANDROID)
- set(FBSUPPORT OFF)
set(NO_PRINTING ON)
list(APPEND QT_EXTRA_COMPONENTS AndroidExtras)
list(APPEND QT_EXTRA_LIBRARIES Qt5::AndroidExtras)
@@ -208,11 +207,6 @@ if (${SUBSURFACE_TARGET_EXECUTABLE} MATCHES "DesktopExecutable")
add_subdirectory(desktop-widgets)
endif()
-if(FBSUPPORT)
- add_definitions(-DFBSUPPORT)
- set(FACEBOOK_INTEGRATION facebook_integration)
-endif()
-
# create the executables
if(${SUBSURFACE_TARGET_EXECUTABLE} MATCHES "MobileExecutable")
set(SUBSURFACE_TARGET subsurface-mobile)
diff --git a/desktop-widgets/plugins/facebook/CMakeLists.txt b/desktop-widgets/plugins/facebook/CMakeLists.txt
index eb0da754c..592700ad4 100644
--- a/desktop-widgets/plugins/facebook/CMakeLists.txt
+++ b/desktop-widgets/plugins/facebook/CMakeLists.txt
@@ -1,17 +1,22 @@
+if (ANDROID)
+ set(FACEBOOK_INTEGRATION "")
+elseif (${FBSUPPORT})
+ add_definitions(-DFBSUPPORT)
+ set(FACEBOOK_INTEGRATION facebook_integration)
+ include_directories(${CMAKE_CURRENT_BINARY_DIR})
-include_directories(${CMAKE_CURRENT_BINARY_DIR})
+ set(FACEBOOK_PLUGIN_UI
+ facebookconnectwidget.ui
+ socialnetworksdialog.ui
+ )
-set(FACEBOOK_PLUGIN_UI
- facebookconnectwidget.ui
- socialnetworksdialog.ui
-)
+ set(FACEBOOK_PLUGIN_SRCS
+ facebook_integration.cpp
+ facebookconnectwidget.cpp
+ )
-set(FACEBOOK_PLUGIN_SRCS
- facebook_integration.cpp
- facebookconnectwidget.cpp
-)
-
-qt5_wrap_ui(FACEBOOK_PLUGIN_UI_SRCS ${FACEBOOK_PLUGIN_UI})
-add_library(facebook_integration STATIC ${FACEBOOK_PLUGIN_SRCS} ${FACEBOOK_PLUGIN_UI_SRCS})
-target_link_libraries(facebook_integration ${QT_LIBRARIES})
-add_dependencies(facebook_integration subsurface_corelib) \ No newline at end of file
+ qt5_wrap_ui(FACEBOOK_PLUGIN_UI_SRCS ${FACEBOOK_PLUGIN_UI})
+ add_library(facebook_integration STATIC ${FACEBOOK_PLUGIN_SRCS} ${FACEBOOK_PLUGIN_UI_SRCS})
+ target_link_libraries(facebook_integration ${QT_LIBRARIES})
+ add_dependencies(facebook_integration subsurface_corelib)
+endif()