diff options
author | Joerg Bornemann <joerg.bornemann@digia.com> | 2013-03-05 18:16:46 +0100 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@digia.com> | 2013-03-15 11:28:39 +0100 |
commit | ff6f0e96164e8cd315fa2fb1ce63e635ed7584d3 (patch) | |
tree | f8ab6bf4eaa83e347f7b45a7ea435df2f129b457 | |
parent | 92322bec3d4ebe6279c429d59d522dc33c2ed2be (diff) |
add qbs files to build qbs
Change-Id: I3aca8364a58ac26a495909c0313f8f0588784b9f
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
-rw-r--r-- | qbs.qbs | 28 | ||||
-rw-r--r-- | src/app/apptemplate.qbs | 30 | ||||
-rw-r--r-- | src/app/config-ui/config-ui.qbs | 16 | ||||
-rw-r--r-- | src/app/config/config.qbs | 16 | ||||
-rw-r--r-- | src/app/detect-toolchains/detect-toolchains.qbs | 15 | ||||
-rw-r--r-- | src/app/qbs-qmltypes/qbs-qmltypes.qbs | 11 | ||||
-rw-r--r-- | src/app/qbs-setup-qt/qbs-setup-qt.qbs | 13 | ||||
-rw-r--r-- | src/app/qbs/qbs.qbs | 43 | ||||
-rw-r--r-- | src/app/setupmaddeplatforms/setupmaddeplatforms.qbs | 13 | ||||
-rw-r--r-- | src/lib/lib.qbs | 290 | ||||
-rw-r--r-- | src/plugins/scanner/cpp/cpp.qbs | 18 | ||||
-rw-r--r-- | src/plugins/scanner/qt/qt.qbs | 11 | ||||
-rw-r--r-- | src/plugins/scanner/scannerplugin.qbs | 13 |
13 files changed, 517 insertions, 0 deletions
diff --git a/qbs.qbs b/qbs.qbs new file mode 100644 index 000000000..7a72fa7b5 --- /dev/null +++ b/qbs.qbs @@ -0,0 +1,28 @@ +import qbs 1.0 + +Project { + property string version: "0.3.0" + property bool enableTests: false + references: [ + "src/app/config/config.qbs", + "src/app/config-ui/config-ui.qbs", + "src/app/detect-toolchains/detect-toolchains.qbs", + "src/app/qbs/qbs.qbs", + "src/app/qbs-qmltypes/qbs-qmltypes.qbs", + "src/app/qbs-setup-qt/qbs-setup-qt.qbs", + "src/app/setupmaddeplatforms/setupmaddeplatforms.qbs", + "src/lib/lib.qbs", + "src/plugins/scanner/cpp/cpp.qbs", + "src/plugins/scanner/qt/qt.qbs", + ] + + Product { + name: "share" + Group { + files: ["share/qbs"] + qbs.install: true + qbs.installDir: "shared" + } + } +} + diff --git a/src/app/apptemplate.qbs b/src/app/apptemplate.qbs new file mode 100644 index 000000000..13044df4b --- /dev/null +++ b/src/app/apptemplate.qbs @@ -0,0 +1,30 @@ +import qbs 1.0 + +Product { + Depends { name: "qbscore" } + Depends { name: "cpp" } + Depends { name: "qt.core" } + type: "application" + consoleApplication: true + destinationDirectory: "bin" + cpp.includePaths: [ + "../shared", // for the logger + ] + cpp.rpaths: qbs.targetOS === "linux" ? ["$ORIGIN/../lib"] : undefined + Group { + fileTagsFilter: product.type + qbs.install: true + qbs.installDir: "bin" + } + Group { + name: "logging" + prefix: "../shared/logging/" + files: [ + "coloredoutput.cpp", + "coloredoutput.h", + "consolelogger.cpp", + "consolelogger.h" + ] + } +} + diff --git a/src/app/config-ui/config-ui.qbs b/src/app/config-ui/config-ui.qbs new file mode 100644 index 000000000..74f927909 --- /dev/null +++ b/src/app/config-ui/config-ui.qbs @@ -0,0 +1,16 @@ +import qbs 1.0 +import "../apptemplate.qbs" as QbsApp + +QbsApp { + Depends { name: "qt.widgets" } + name: "qbs-config-ui" + files: [ + "main.cpp", + "mainwindow.cpp", + "mainwindow.h", + "mainwindow.ui", + "settingsmodel.cpp", + "settingsmodel.h" + ] +} + diff --git a/src/app/config/config.qbs b/src/app/config/config.qbs new file mode 100644 index 000000000..7944afca1 --- /dev/null +++ b/src/app/config/config.qbs @@ -0,0 +1,16 @@ +import qbs 1.0 +import "../apptemplate.qbs" as QbsApp + +QbsApp { + name: "qbs-config" + files: [ + "../shared/qbssettings.h", + "configcommand.h", + "configcommandexecutor.cpp", + "configcommandexecutor.h", + "configcommandlineparser.cpp", + "configcommandlineparser.h", + "configmain.cpp" + ] +} + diff --git a/src/app/detect-toolchains/detect-toolchains.qbs b/src/app/detect-toolchains/detect-toolchains.qbs new file mode 100644 index 000000000..10fc39527 --- /dev/null +++ b/src/app/detect-toolchains/detect-toolchains.qbs @@ -0,0 +1,15 @@ +import qbs 1.0 +import "../apptemplate.qbs" as QbsApp + +QbsApp { + name: "qbs-detect-toolchains" + files: [ + "../shared/qbssettings.h", + "main.cpp", + "msvcprobe.cpp", + "msvcprobe.h", + "probe.cpp", + "probe.h" + ] +} + diff --git a/src/app/qbs-qmltypes/qbs-qmltypes.qbs b/src/app/qbs-qmltypes/qbs-qmltypes.qbs new file mode 100644 index 000000000..97e02b2e9 --- /dev/null +++ b/src/app/qbs-qmltypes/qbs-qmltypes.qbs @@ -0,0 +1,11 @@ +import qbs 1.0 +import "../apptemplate.qbs" as QbsApp + +QbsApp { + name: "qbs-qmltypes" + files: [ + "../shared/qbssettings.h", + "main.cpp" + ] +} + diff --git a/src/app/qbs-setup-qt/qbs-setup-qt.qbs b/src/app/qbs-setup-qt/qbs-setup-qt.qbs new file mode 100644 index 000000000..9bb371c14 --- /dev/null +++ b/src/app/qbs-setup-qt/qbs-setup-qt.qbs @@ -0,0 +1,13 @@ +import qbs 1.0 +import "../apptemplate.qbs" as QbsApp + +QbsApp { + name: "qbs-setup-qt" + files: [ + "../shared/qbssettings.h", + "main.cpp", + "setupqt.cpp", + "setupqt.h" + ] +} + diff --git a/src/app/qbs/qbs.qbs b/src/app/qbs/qbs.qbs new file mode 100644 index 000000000..f6519d56a --- /dev/null +++ b/src/app/qbs/qbs.qbs @@ -0,0 +1,43 @@ +import qbs 1.0 +import "../apptemplate.qbs" as QbsApp + +QbsApp { + name: "qbs" + cpp.defines: ["QBS_VERSION=\"" + project.version + "\""] + files: [ + "../shared/qbssettings.h", + "application.cpp", + "application.h", + "commandlinefrontend.cpp", + "commandlinefrontend.h", + "consoleprogressobserver.cpp", + "consoleprogressobserver.h", + "ctrlchandler.cpp", + "ctrlchandler.h", + "main.cpp", + "qbstool.cpp", + "qbstool.h", + "showproperties.cpp", + "showproperties.h", + "status.cpp", + "status.h", + ] + Group { + name: "parser" + prefix: name + '/' + files: [ + "command.cpp", + "command.h", + "commandlineoption.cpp", + "commandlineoption.h", + "commandlineoptionpool.cpp", + "commandlineoptionpool.h", + "commandlineparser.cpp", + "commandlineparser.h", + "commandpool.cpp", + "commandpool.h", + "commandtype.h", + ] + } +} + diff --git a/src/app/setupmaddeplatforms/setupmaddeplatforms.qbs b/src/app/setupmaddeplatforms/setupmaddeplatforms.qbs new file mode 100644 index 000000000..4432c0832 --- /dev/null +++ b/src/app/setupmaddeplatforms/setupmaddeplatforms.qbs @@ -0,0 +1,13 @@ +import qbs 1.0 +import "../apptemplate.qbs" as QbsApp + +QbsApp { + name: "qbs-setup-madde-platforms" + files: [ + "../shared/qbssettings.h", + "../shared/specialplatformssetup.cpp", + "../shared/specialplatformssetup.h", + "main.cpp" + ] +} + diff --git a/src/lib/lib.qbs b/src/lib/lib.qbs new file mode 100644 index 000000000..7ba02e2da --- /dev/null +++ b/src/lib/lib.qbs @@ -0,0 +1,290 @@ +import qbs 1.0 + +DynamicLibrary { + Depends { name: "cpp" } + Depends { name: "qt"; submodules: ["core", "script", "test"] } + Depends { condition: qt.core.versionMajor >= 5; name: "qt.concurrent" } + name: "qbscore" + targetName: (qbs.enableDebugCode && qbs.targetOS === "windows") ? (name + 'd') : name + destinationDirectory: qbs.targetOS == "windows" ? "bin" : "lib" + cpp.treatWarningsAsErrors: true + cpp.includePaths: [ + ".", + ".." // for the plugin headers + ] + cpp.defines: [ + "QBS_VERSION=\"" + project.version + "\"", + "QT_CREATOR", "QML_BUILD_STATIC_LIB", // needed for QmlJS + "QBS_LIBRARY", "SRCDIR=\"" + path + "\"" + ] + Properties { + condition: qbs.toolchain === "msvc" + cpp.cxxFlags: ["/WX"] + } + Properties { + condition: qbs.toolchain === "gcc" && qbs.targetPlatform.indexOf("windows") === -1 + cpp.cxxFlags: ["-Werror"] + } + Group { + name: product.name + files: ["qbs.h"] + } + Group { + name: "api" + prefix: name + '/' + files: [ + "internaljobs.cpp", + "internaljobs.h", + "jobs.cpp", + "jobs.h", + "project.cpp", + "project.h", + "projectdata.cpp", + "projectdata.h", + "propertymap_p.h", + "runenvironment.cpp", + "runenvironment.h" + ] + } + Group { + name: "buildgraph" + prefix: name + '/' + files: [ + "abstractcommandexecutor.cpp", + "abstractcommandexecutor.h", + "artifact.cpp", + "artifact.h", + "artifactcleaner.cpp", + "artifactcleaner.h", + "artifactlist.cpp", + "artifactlist.h", + "artifactvisitor.cpp", + "artifactvisitor.h", + "automoc.cpp", + "automoc.h", + "buildgraph.cpp", + "buildgraph.h", + "buildproduct.cpp", + "buildproduct.h", + "buildproject.cpp", + "buildproject.h", + "command.cpp", + "command.h", + "cycledetector.cpp", + "cycledetector.h", + "executor.cpp", + "executor.h", + "executorjob.cpp", + "executorjob.h", + "forward_decls.h", + "inputartifactscanner.cpp", + "inputartifactscanner.h", + "jscommandexecutor.cpp", + "jscommandexecutor.h", + "processcommandexecutor.cpp", + "processcommandexecutor.h", + "productinstaller.cpp", + "productinstaller.h", + "rulegraph.cpp", + "rulegraph.h", + "rulesapplicator.cpp", + "rulesapplicator.h", + "rulesevaluationcontext.cpp", + "rulesevaluationcontext.h", + "scanresultcache.cpp", + "scanresultcache.h", + "timestampsupdater.cpp", + "timestampsupdater.h", + "transformer.cpp", + "transformer.h" + ] + } + Group { + name: "jsextensions" + prefix: name + '/' + files: [ + "file.cpp", + "file.h", + "moduleproperties.cpp", + "moduleproperties.h", + "process.cpp", + "process.h", + "textfile.cpp", + "textfile.h" + ] + } + Group { + name: "language" + prefix: name + '/' + files: [ + "artifactproperties.cpp", + "artifactproperties.h", + "asttools.cpp", + "asttools.h", + "builtindeclarations.cpp", + "builtindeclarations.h", + "builtinvalue.cpp", + "builtinvalue.h", + "evaluationdata.h", + "evaluator.cpp", + "evaluator.h", + "evaluatorscriptclass.cpp", + "evaluatorscriptclass.h", + "filecontext.cpp", + "filecontext.h", + "filetags.cpp", + "filetags.h", + "forward_decls.h", + "forward_decls.h", + "functiondeclaration.h", + "identifiersearch.cpp", + "identifiersearch.h", + "importversion.cpp", + "importversion.h", + "item.cpp", + "item.h", + "itemobserver.h", + "itemreader.cpp", + "itemreader.h", + "itemreaderastvisitor.cpp", + "itemreaderastvisitor.h", + "jsimports.h", + "language.cpp", + "language.h", + "loader.cpp", + "loader.h", + "moduleloader.cpp", + "moduleloader.h", + "projectresolver.cpp", + "projectresolver.h", + "propertydeclaration.cpp", + "propertydeclaration.h", + "scriptengine.cpp", + "scriptengine.h", + "value.cpp", + "value.h" + ] + } + Group { + name: "logging" + prefix: name + '/' + files: [ + "ilogsink.cpp", + "ilogsink.h", + "logger.cpp", + "logger.h", + "translator.h" + ] + } + Group { + name: "parser" + prefix: name + '/' + files: [ + "qmlerror.cpp", + "qmlerror.h", + "qmljsast.cpp", + "qmljsast_p.h", + "qmljsastfwd_p.h", + "qmljsastvisitor.cpp", + "qmljsastvisitor_p.h", + "qmljsengine_p.cpp", + "qmljsengine_p.h", + "qmljsglobal_p.h", + "qmljsgrammar.cpp", + "qmljsgrammar_p.h", + "qmljskeywords_p.h", + "qmljslexer.cpp", + "qmljslexer_p.h", + "qmljsmemorypool_p.h", + "qmljsparser.cpp", + "qmljsparser_p.h" + ] + } + Group { + name: "tools" + prefix: name + '/' + files: [ + "buildoptions.cpp", + "buildoptions.h", + "cleanoptions.cpp", + "cleanoptions.h", + "codelocation.cpp", + "codelocation.h", + "error.cpp", + "error.h", + "fileinfo.cpp", + "fileinfo.h", + "filetime.h", + "hostosinfo.h", + "id.cpp", + "id.h", + "installoptions.cpp", + "installoptions.h", + "persistence.cpp", + "persistence.h", + "persistentobject.h", + "preferences.cpp", + "preferences.h", + "processresult.h", + "profile.cpp", + "profile.h", + "progressobserver.cpp", + "progressobserver.h", + "propertyfinder.cpp", + "propertyfinder.h", + "qbs_export.h", + "qbsassert.cpp", + "qbsassert.h", + "qttools.cpp", + "qttools.h", + "scannerpluginmanager.cpp", + "scannerpluginmanager.h", + "scripttools.cpp", + "scripttools.h", + "settings.cpp", + "settings.h", + "setupprojectparameters.cpp", + "setupprojectparameters.h", + "weakpointer.h" + ] + } + Group { + condition: qbs.targetPlatform.indexOf("windows") != -1 + name: "tools (Windows)" + prefix: "tools/" + files: [ + "filetime_win.cpp" + ] + } + Group { + condition: qbs.targetPlatform.indexOf("unix") != -1 + name: "tools (Unix)" + prefix: "tools/" + files: [ + "filetime_unix.cpp" + ] + } + Group { + condition: project.enableTests + name: "tests" + files: [ + "buildgraph/tst_buildgraph.cpp", + "buildgraph/tst_buildgraph.h", + "language/tst_language.cpp", + "language/tst_language.h", + "tools/tst_tools.h", + "tools/tst_tools.cpp" + ] + } + Group { + fileTagsFilter: "dynamiclibrary" + qbs.install: true + qbs.installDir: qbs.targetOS === "windows" ? "bin" : "lib" + } + ProductModule { + Depends { name: "cpp" } + Depends { name: "qt"; submodules: ["script"]} + cpp.includePaths: ["."] + } +} + diff --git a/src/plugins/scanner/cpp/cpp.qbs b/src/plugins/scanner/cpp/cpp.qbs new file mode 100644 index 000000000..ce15c59fa --- /dev/null +++ b/src/plugins/scanner/cpp/cpp.qbs @@ -0,0 +1,18 @@ +import qbs 1.0 +import "../scannerplugin.qbs" as ScannerPlugin + +ScannerPlugin { + cpp.defines: ["CPLUSPLUS_NO_PARSER"] + name: "qbs_cpp_scanner" + files: [ + "../scanner.h", + "CPlusPlusForwardDeclarations.h", + "Lexer.cpp", + "Lexer.h", + "Token.cpp", + "Token.h", + "cpp_global.h", + "cppscanner.cpp" + ] +} + diff --git a/src/plugins/scanner/qt/qt.qbs b/src/plugins/scanner/qt/qt.qbs new file mode 100644 index 000000000..ecc71f8cf --- /dev/null +++ b/src/plugins/scanner/qt/qt.qbs @@ -0,0 +1,11 @@ +import qbs 1.0 +import "../scannerplugin.qbs" as ScannerPlugin + +ScannerPlugin { + name: "qbs_qt_scanner" + files: [ + "../scanner.h", + "qtscanner.cpp" + ] +} + diff --git a/src/plugins/scanner/scannerplugin.qbs b/src/plugins/scanner/scannerplugin.qbs new file mode 100644 index 000000000..cd6229e0a --- /dev/null +++ b/src/plugins/scanner/scannerplugin.qbs @@ -0,0 +1,13 @@ +import qbs 1.0 + +DynamicLibrary { + Depends { name: "cpp" } + Depends { name: "qt.core" } + destinationDirectory: "plugins" + Group { + fileTagsFilter: ["dynamiclibrary"] + qbs.install: true + qbs.installDir: "plugins" + } +} + |