diff options
author | Christian Kandeler <[email protected]> | 2016-06-10 17:51:22 +0200 |
---|---|---|
committer | Christian Kandeler <[email protected]> | 2016-06-15 12:35:55 +0000 |
commit | e1e203598dd876337e7c91e1d4da87f7dab7acf0 (patch) | |
tree | bb56bb035a00d0943ccbf28920bda7ac5597c77f /src/libs/cplusplus | |
parent | 96a3d49b07fa0119d11ed4f76d9f1fd5e86686ef (diff) |
qbs build: Final steps to support building plugins "out of source".
- Use the entire Export block when creating a module, not just the
Depends items. Adapt references to the product source directory
and the "share" directory so that they point to the respective
locations in the install tree.
- Install dev headers for some more plugins.
- Bug fixes & polishing.
Create a "dev installation" like this:
$ qbs qtc.make_dev_package:true qbs.installRoot:<install root>
Then build your plugin against it like this:
$ qbs qtc.make_dev_package:true qbs.installRoot:<install root>
project.qbsSearchPaths:<install root>/qbs-resources
(Using qbs from 1.5 branch; 1.5.1 requires a trivial wrapper project.)
That's all. Successfully tested with all commercial plugins on Linux.
Change-Id: Ie39c4717dafcd431c533421a15f2f898783d8521
Reviewed-by: Jake Petroules <[email protected]>
Reviewed-by: Orgad Shaneh <[email protected]>
Diffstat (limited to 'src/libs/cplusplus')
-rw-r--r-- | src/libs/cplusplus/cplusplus.qbs | 256 |
1 files changed, 132 insertions, 124 deletions
diff --git a/src/libs/cplusplus/cplusplus.qbs b/src/libs/cplusplus/cplusplus.qbs index 8d7c38c883a..c9aae72b3e3 100644 --- a/src/libs/cplusplus/cplusplus.qbs +++ b/src/libs/cplusplus/cplusplus.qbs @@ -1,134 +1,142 @@ import qbs 1.0 -QtcLibrary { +Project { name: "CPlusPlus" - cpp.includePaths: base.concat("../3rdparty") - cpp.defines: base.concat([ - "NDEBUG", - "CPLUSPLUS_BUILD_LIB" - ]) - cpp.optimization: "fast" + QtcDevHeaders { } + QtcDevHeaders { + productName: "cplusplus (3rd party)" + baseDir: sourceDirectory + "/../3rdparty/cplusplus" + } - Depends { name: "Qt.widgets" } - Depends { name: "Utils" } + QtcLibrary { + cpp.includePaths: base.concat("../3rdparty") + cpp.defines: base.concat([ + "NDEBUG", + "CPLUSPLUS_BUILD_LIB" + ]) + cpp.optimization: "fast" - Group { - name: "ThirdPartyCPlusPlus" - prefix: "../3rdparty/cplusplus/" - files: [ - "AST.cpp", - "AST.h", - "ASTClone.cpp", - "ASTMatch0.cpp", - "ASTMatcher.cpp", - "ASTMatcher.h", - "ASTPatternBuilder.cpp", - "ASTPatternBuilder.h", - "ASTVisit.cpp", - "ASTVisitor.cpp", - "ASTVisitor.h", - "ASTfwd.h", - "Bind.cpp", - "Bind.h", - "CPlusPlus.h", - "Control.cpp", - "Control.h", - "CoreTypes.cpp", - "CoreTypes.h", - "DiagnosticClient.cpp", - "DiagnosticClient.h", - "FullySpecifiedType.cpp", - "FullySpecifiedType.h", - "Keywords.cpp", - "Lexer.cpp", - "Lexer.h", - "LiteralTable.h", - "Literals.cpp", - "Literals.h", - "Matcher.cpp", - "Matcher.h", - "MemoryPool.cpp", - "MemoryPool.h", - "Name.cpp", - "Name.h", - "NameVisitor.cpp", - "NameVisitor.h", - "Names.cpp", - "Names.h", - "ObjectiveCAtKeywords.cpp", - "ObjectiveCTypeQualifiers.cpp", - "ObjectiveCTypeQualifiers.h", - "Parser.cpp", - "Parser.h", - "QtContextKeywords.cpp", - "QtContextKeywords.h", - "SafeMatcher.cpp", - "SafeMatcher.h", - "Scope.cpp", - "Scope.h", - "Symbol.cpp", - "Symbol.h", - "SymbolVisitor.h", - "Symbols.cpp", - "Symbols.h", - "Templates.cpp", - "Templates.h", - "Token.cpp", - "Token.h", - "TranslationUnit.cpp", - "TranslationUnit.h", - "Type.cpp", - "Type.h", - "TypeVisitor.cpp", - "TypeVisitor.h", - ] - } + Depends { name: "Qt.widgets" } + Depends { name: "Utils" } - Group { - name: "General" - files: [ - "AlreadyConsideredClassContainer.h", - "ASTParent.cpp", "ASTParent.h", - "ASTPath.cpp", "ASTPath.h", - "BackwardsScanner.cpp", "BackwardsScanner.h", - "CppDocument.cpp", "CppDocument.h", - "CppRewriter.cpp", "CppRewriter.h", - "cppmodelmanagerbase.cpp", "cppmodelmanagerbase.h", - "DependencyTable.cpp", "DependencyTable.h", - "DeprecatedGenTemplateInstance.cpp", "DeprecatedGenTemplateInstance.h", - "ExpressionUnderCursor.cpp", "ExpressionUnderCursor.h", - "FastPreprocessor.cpp", "FastPreprocessor.h", - "FindUsages.cpp", "FindUsages.h", - "Icons.cpp", "Icons.h", - "LookupContext.cpp", "LookupContext.h", - "LookupItem.cpp", "LookupItem.h", - "Macro.cpp", "Macro.h", - "MatchingText.cpp", "MatchingText.h", - "NamePrettyPrinter.cpp", "NamePrettyPrinter.h", - "Overview.cpp", "Overview.h", - "OverviewModel.cpp", "OverviewModel.h", - "PPToken.cpp", "PPToken.h", - "PreprocessorClient.cpp", "PreprocessorClient.h", - "PreprocessorEnvironment.cpp", "PreprocessorEnvironment.h", - "ResolveExpression.cpp", "ResolveExpression.h", - "SimpleLexer.cpp", "SimpleLexer.h", - "SnapshotSymbolVisitor.cpp", "SnapshotSymbolVisitor.h", - "SymbolNameVisitor.cpp", "SymbolNameVisitor.h", - "TypeOfExpression.cpp", "TypeOfExpression.h", - "TypePrettyPrinter.cpp", "TypePrettyPrinter.h", - "cplusplus.qrc", - "findcdbbreakpoint.cpp", "findcdbbreakpoint.h", - "pp-cctype.h", - "pp-engine.cpp", "pp-engine.h", - "pp-scanner.cpp", "pp-scanner.h", - "pp.h", - ] - } + Group { + name: "ThirdPartyCPlusPlus" + prefix: "../3rdparty/cplusplus/" + files: [ + "AST.cpp", + "AST.h", + "ASTClone.cpp", + "ASTMatch0.cpp", + "ASTMatcher.cpp", + "ASTMatcher.h", + "ASTPatternBuilder.cpp", + "ASTPatternBuilder.h", + "ASTVisit.cpp", + "ASTVisitor.cpp", + "ASTVisitor.h", + "ASTfwd.h", + "Bind.cpp", + "Bind.h", + "CPlusPlus.h", + "Control.cpp", + "Control.h", + "CoreTypes.cpp", + "CoreTypes.h", + "DiagnosticClient.cpp", + "DiagnosticClient.h", + "FullySpecifiedType.cpp", + "FullySpecifiedType.h", + "Keywords.cpp", + "Lexer.cpp", + "Lexer.h", + "LiteralTable.h", + "Literals.cpp", + "Literals.h", + "Matcher.cpp", + "Matcher.h", + "MemoryPool.cpp", + "MemoryPool.h", + "Name.cpp", + "Name.h", + "NameVisitor.cpp", + "NameVisitor.h", + "Names.cpp", + "Names.h", + "ObjectiveCAtKeywords.cpp", + "ObjectiveCTypeQualifiers.cpp", + "ObjectiveCTypeQualifiers.h", + "Parser.cpp", + "Parser.h", + "QtContextKeywords.cpp", + "QtContextKeywords.h", + "SafeMatcher.cpp", + "SafeMatcher.h", + "Scope.cpp", + "Scope.h", + "Symbol.cpp", + "Symbol.h", + "SymbolVisitor.h", + "Symbols.cpp", + "Symbols.h", + "Templates.cpp", + "Templates.h", + "Token.cpp", + "Token.h", + "TranslationUnit.cpp", + "TranslationUnit.h", + "Type.cpp", + "Type.h", + "TypeVisitor.cpp", + "TypeVisitor.h", + ] + } + + Group { + name: "General" + files: [ + "AlreadyConsideredClassContainer.h", + "ASTParent.cpp", "ASTParent.h", + "ASTPath.cpp", "ASTPath.h", + "BackwardsScanner.cpp", "BackwardsScanner.h", + "CppDocument.cpp", "CppDocument.h", + "CppRewriter.cpp", "CppRewriter.h", + "cppmodelmanagerbase.cpp", "cppmodelmanagerbase.h", + "DependencyTable.cpp", "DependencyTable.h", + "DeprecatedGenTemplateInstance.cpp", "DeprecatedGenTemplateInstance.h", + "ExpressionUnderCursor.cpp", "ExpressionUnderCursor.h", + "FastPreprocessor.cpp", "FastPreprocessor.h", + "FindUsages.cpp", "FindUsages.h", + "Icons.cpp", "Icons.h", + "LookupContext.cpp", "LookupContext.h", + "LookupItem.cpp", "LookupItem.h", + "Macro.cpp", "Macro.h", + "MatchingText.cpp", "MatchingText.h", + "NamePrettyPrinter.cpp", "NamePrettyPrinter.h", + "Overview.cpp", "Overview.h", + "OverviewModel.cpp", "OverviewModel.h", + "PPToken.cpp", "PPToken.h", + "PreprocessorClient.cpp", "PreprocessorClient.h", + "PreprocessorEnvironment.cpp", "PreprocessorEnvironment.h", + "ResolveExpression.cpp", "ResolveExpression.h", + "SimpleLexer.cpp", "SimpleLexer.h", + "SnapshotSymbolVisitor.cpp", "SnapshotSymbolVisitor.h", + "SymbolNameVisitor.cpp", "SymbolNameVisitor.h", + "TypeOfExpression.cpp", "TypeOfExpression.h", + "TypePrettyPrinter.cpp", "TypePrettyPrinter.h", + "cplusplus.qrc", + "findcdbbreakpoint.cpp", "findcdbbreakpoint.h", + "pp-cctype.h", + "pp-engine.cpp", "pp-engine.h", + "pp-scanner.cpp", "pp-scanner.h", + "pp.h", + ] + } - Export { - cpp.includePaths: [ - "../3rdparty" - ] + Export { + cpp.includePaths: [ + product.sourceDirectory + "/../3rdparty" + ] + } } } |