Make licensechecker dependency optional

Change-Id: Ie867d2da37a507d36caaf16494f996b88ca4e142
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
This commit is contained in:
Kai Koehne
2015-06-11 17:29:00 +02:00
parent bd3195ec6b
commit d49232bbf1
3 changed files with 13 additions and 4 deletions

View File

@@ -50,5 +50,7 @@ equals(TEST, 1) {
RESOURCES += clangstaticanalyzerunittests.qrc
}
CONFIG(licensechecker): DEFINES += LICENSECHECKER
DISTFILES += \
tests/tests.pri

View File

@@ -4,8 +4,9 @@ QTC_LIB_DEPENDS += \
utils
QTC_PLUGIN_DEPENDS += \
analyzerbase \
cpptools \
licensechecker
cpptools
QTC_TEST_DEPENDS += \
qbsprojectmanager \
qmakeprojectmanager
CONFIG(licensechecker): QTC_PLUGIN_DEPENDS += licensechecker

View File

@@ -35,9 +35,12 @@
#include <coreplugin/actionmanager/actioncontainer.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/dialogs/ioptionspage.h>
#include <licensechecker/licensecheckerplugin.h>
#include <projectexplorer/projectpanelfactory.h>
#ifdef LICENSECHECKER
#include <licensechecker/licensecheckerplugin.h>
#endif
#include <extensionsystem/pluginmanager.h>
#include <QAction>
@@ -114,6 +117,7 @@ bool ClangStaticAnalyzerPlugin::initialize(const QStringList &arguments, QString
panelFactory->setSimpleCreateWidgetFunction<ProjectSettingsWidget>(QIcon());
ProjectExplorer::ProjectPanelFactory::registerFactory(panelFactory);
#ifdef LICENSECHECKER
LicenseChecker::LicenseCheckerPlugin *licenseChecker
= ExtensionSystem::PluginManager::getObject<LicenseChecker::LicenseCheckerPlugin>();
@@ -123,8 +127,10 @@ bool ClangStaticAnalyzerPlugin::initialize(const QStringList &arguments, QString
} else {
qWarning() << "Invalid license, disabling Clang Static Analyzer";
}
return true;
#else // LICENSECHECKER
return initializeEnterpriseFeatures(arguments, errorString);
#endif
}
bool ClangStaticAnalyzerPlugin::initializeEnterpriseFeatures(const QStringList &arguments,