aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2015-07-01 17:08:33 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-07-01 08:59:30 -0700
commit82b51e802147392438e51801766baeaf630218af (patch)
tree635455a43a50610870d8c324bedcde7b90f4820d
parent186f8c6ac1d57619455222349f895a6fc0fafde1 (diff)
downloadsubsurface-82b51e802147392438e51801766baeaf630218af.tar.gz
Re-introduce NO_USERMANUAL for Android building
This re-introduces the NO_USERMANUAL flag, which is needed due to the fact that Qt-Android doesn't have a WebView to view the manual in. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--CMakeLists.txt16
1 files changed, 13 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2f84ffe78..0190cb482 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -14,6 +14,7 @@ option(NO_MARBLE "disable the marble widget" OFF)
option(NO_TESTS "disable the tests" OFF)
option(NO_DOCS "disable the docs" OFF)
option(NO_PRINTING "disable the printing support" ON)
+option(NO_USERMANUAL "don't include a viewer for the user manual" OFF)
option(USE_LIBGIT23_API "allow building with libgit2 master" OFF)
option(SUBSURFACE_MOBILE "build the QtQuick version for mobile device" OFF)
@@ -121,6 +122,15 @@ else()
)
endif()
+if(NO_USERMANUAL)
+ message(STATUS "building without usermanual")
+ add_definitions(-DNO_USERMANUAL)
+else()
+ set(USERMANUAL qt-ui/usermanual.cpp)
+ set(WEBKIT_PKG WebKitWidgets)
+ set(WEBKIT_LIB Qt5::WebKitWidgets)
+endif()
+
set(SUBSURFACE_LINK_LIBRARIES ${SUBSURFACE_LINK_LIBRARIES} ${LIBDIVECOMPUTER_LIBRARIES} ${LIBGIT2_LIBRARIES} ${GRANTLEE_LIBRARIES} -lusb-1.0)
# handle out of tree build correctly
@@ -142,8 +152,8 @@ endif()
if(SUBSURFACE_MOBILE)
set(QT_QUICK Quick)
endif()
-find_package(Qt5 REQUIRED COMPONENTS Core Concurrent Widgets Network WebKitWidgets PrintSupport Svg Test LinguistTools ${QT_QUICK})
-set(QT_LIBRARIES Qt5::Core Qt5::Concurrent Qt5::Widgets Qt5::Network Qt5::WebKitWidgets Qt5::PrintSupport Qt5::Svg)
+find_package(Qt5 REQUIRED COMPONENTS Core Concurrent Widgets Network ${WEBKIT_PKG} PrintSupport Svg Test LinguistTools ${QT_QUICK})
+set(QT_LIBRARIES Qt5::Core Qt5::Concurrent Qt5::Widgets Qt5::Network ${WEBKIT_LIB} Qt5::PrintSupport Qt5::Svg)
if(SUBSURFACE_MOBILE)
set(QT_LIBRARIES ${QT_LIBRARIES} Qt5::Quick)
endif()
@@ -352,7 +362,7 @@ set(SUBSURFACE_INTERFACE
qt-ui/divelogimportdialog.cpp
qt-ui/tagwidget.cpp
qt-ui/groupedlineedit.cpp
- qt-ui/usermanual.cpp
+ ${USERMANUAL}
qt-ui/divelogexportdialog.cpp
qt-ui/divepicturewidget.cpp
qt-ui/usersurvey.cpp