From bce765aaa9aa7a54956762dac91487ef0196723d Mon Sep 17 00:00:00 2001 From: hjk Date: Fri, 10 Feb 2017 21:50:37 +0100 Subject: [PATCH] Make Creator compile without QtQuick module being present This is an unsupported configuration for testing only. Change-Id: Idf5dde8210e0599806a3374a964adfd192b60149 Reviewed-by: Eike Ziller --- src/libs/libs.pro | 10 +++++++--- src/libs/utils/hostosinfo.cpp | 5 +++++ src/plugins/plugins.pro | 15 ++++++++++++--- src/tools/tools.pro | 3 ++- 4 files changed, 26 insertions(+), 7 deletions(-) diff --git a/src/libs/libs.pro b/src/libs/libs.pro index 5d53ed86365..34a5d938bf3 100644 --- a/src/libs/libs.pro +++ b/src/libs/libs.pro @@ -14,10 +14,14 @@ SUBDIRS = \ qmleditorwidgets \ glsl \ ssh \ - timeline \ sqlite \ - clangbackendipc \ - flamegraph + clangbackendipc + +qtHaveModule(quick) { + SUBDIRS += \ + flamegraph \ + timeline +} for(l, SUBDIRS) { QTC_LIB_DEPENDS = diff --git a/src/libs/utils/hostosinfo.cpp b/src/libs/utils/hostosinfo.cpp index 775b00bf7b1..ff5eb1b469c 100644 --- a/src/libs/utils/hostosinfo.cpp +++ b/src/libs/utils/hostosinfo.cpp @@ -82,9 +82,14 @@ void HostOsInfo::unsetOverrideFileNameCaseSensitivity() bool HostOsInfo::canCreateOpenGLContext(QString *errorMessage) { +#ifdef QT_NO_OPENGL + Q_UNUSED(errorMessage) + return false; +#else static const bool canCreate = QOpenGLContext().create(); if (!canCreate) *errorMessage = QApplication::translate("Utils::HostOsInfo", "Cannot create OpenGL context."); return canCreate; +#endif } diff --git a/src/plugins/plugins.pro b/src/plugins/plugins.pro index 99f97598c6c..a5a2dd2a0ba 100644 --- a/src/plugins/plugins.pro +++ b/src/plugins/plugins.pro @@ -52,11 +52,16 @@ SUBDIRS = \ modeleditor \ qmakeandroidsupport \ winrt \ - qmlprofiler \ updateinfo \ scxmleditor \ welcome +qtHaveModule(quick) { + SUBDIRS += qmlprofiler +} else { + warning("QmlProfiler plugin has been disabled since the Qt Quick module is not available.") +} + qtHaveModule(help) { SUBDIRS += help } else { @@ -70,10 +75,14 @@ qtHaveModule(designercomponents_private) { } DO_NOT_BUILD_QMLDESIGNER = $$(DO_NOT_BUILD_QMLDESIGNER) -isEmpty(DO_NOT_BUILD_QMLDESIGNER) { +isEmpty(DO_NOT_BUILD_QMLDESIGNER):qtHaveModule(quick) { SUBDIRS += qmldesigner } else { - warning("QmlDesigner plugin has been disabled.") + !qtHaveModule(quick) { + warning("QmlDesigner plugin has been disabled since the Qt Quick module is not available.") + } else { + warning("QmlDesigner plugin has been disabled since DO_NOT_BUILD_QMLDESIGNER is set.") + } } diff --git a/src/tools/tools.pro b/src/tools/tools.pro index 1637dc9f286..65901ba6028 100644 --- a/src/tools/tools.pro +++ b/src/tools/tools.pro @@ -5,9 +5,10 @@ SUBDIRS = qtpromaker \ sdktool \ valgrindfake \ 3rdparty \ - qml2puppet \ buildoutputparser +qtHaveModule(quick): SUBDIRS += qml2puppet + win32 { SUBDIRS += qtcdebugger \ wininterrupt \