summaryrefslogtreecommitdiffstats
path: root/cui
diff options
context:
space:
mode:
authorOliver Specht <oliver.specht@cib.de>2016-03-23 13:40:13 +0100
committerOliver Specht <oliver.specht@cib.de>2016-03-25 11:05:47 +0000
commit96c1ae1d8e78ae8b9bd7d4001645cad24d62b720 (patch)
tree1482b9e0b899a783f64aaed3b9728533a81eff58 /cui
parentUpdated core (diff)
downloadcore-96c1ae1d8e78ae8b9bd7d4001645cad24d62b720.tar.gz
core-96c1ae1d8e78ae8b9bd7d4001645cad24d62b720.zip
fix headless build
disables OpenGL and glew usage, lets --without-gui do what --without-x did before and disables X related test Change-Id: I680b47c9962a0d43c8ece593db0b82e347ceebdb Reviewed-on: https://gerrit.libreoffice.org/23474 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Oliver Specht <oliver.specht@cib.de>
Diffstat (limited to 'cui')
-rw-r--r--cui/Library_cui.mk6
-rw-r--r--cui/source/options/optgdlg.cxx13
2 files changed, 16 insertions, 3 deletions
diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index 86cc3796e1b9..427e5faf6f09 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -69,8 +69,12 @@ $(eval $(call gb_Library_use_externals,cui,\
boost_headers \
icuuc \
icu_headers \
- glew \
))
+ifeq ($(ENABLE_OPENGL),TRUE)
+$(eval $(call gb_Library_use_externals,cui,\
+ glew \
+ ))
+endif
ifeq ($(OS),WNT)
$(eval $(call gb_Library_use_system_win32_libs,cui,\
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index f4d4d5cc771b..b4da71fec511 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -17,6 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
#include <svl/zforlist.hxx>
#include <svl/currencytable.hxx>
#include <svtools/grfmgr.hxx>
@@ -89,8 +90,9 @@
#include <vcl/svapp.hxx>
#include <vcl/settings.hxx>
#include <vcl/IconThemeInfo.hxx>
+#if HAVE_FEATURE_OPENGL
#include <vcl/opengl/OpenGLWrapper.hxx>
-
+#endif
#include "optgdlg.hxx"
#include <svx/ofaitem.hxx>
#include <svtools/apearcfg.hxx>
@@ -511,10 +513,13 @@ CanvasSettings::CanvasSettings() :
bool CanvasSettings::IsHardwareAccelerationAvailable() const
{
+#if HAVE_FEATURE_OPENGL
if( OpenGLWrapper::isVCLOpenGLEnabled() )
mbHWAccelAvailable = false;
- else if( !mbHWAccelChecked )
+ else
+#endif
+ if( !mbHWAccelChecked )
{
mbHWAccelChecked = true;
@@ -980,7 +985,11 @@ void OfaViewTabPage::UpdateOGLStatus()
if (Application::GetToolkitName() == "gtk3")
return;
// Easier than a custom translation string.
+#if HAVE_FEATURE_OPENGL
bool bEnabled = OpenGLWrapper::isVCLOpenGLEnabled();
+#else
+ bool bEnabled = false;
+#endif
m_pOpenGLStatusEnabled->Show(bEnabled);
m_pOpenGLStatusDisabled->Show(!bEnabled);
}