forked from qt-creator/qt-creator
Add static library for qmake project file parser.
This is needed to build plugins "out of source". Change-Id: If842cde86e1eb54daa3daf7f9d6f27751f657d9e Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
@@ -64,7 +64,7 @@ Module {
|
|||||||
|
|
||||||
Rule {
|
Rule {
|
||||||
condition: make_dev_package
|
condition: make_dev_package
|
||||||
inputs: ["dynamiclibrary", "staticlibrary"]
|
inputs: [product.type.contains("dynamiclibrary") ? "dynamiclibrary" : "staticlibrary"]
|
||||||
Artifact {
|
Artifact {
|
||||||
filePath: product.name + "-module.qbs"
|
filePath: product.name + "-module.qbs"
|
||||||
fileTags: ["qtc.dev-module"]
|
fileTags: ["qtc.dev-module"]
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ Project {
|
|||||||
Depends { name: "Qt"; submodules: ["widgets", "xml", "network"] }
|
Depends { name: "Qt"; submodules: ["widgets", "xml", "network"] }
|
||||||
Depends { name: "Core" }
|
Depends { name: "Core" }
|
||||||
Depends { name: "Debugger" }
|
Depends { name: "Debugger" }
|
||||||
|
Depends { name: "ProParser" }
|
||||||
Depends { name: "ProjectExplorer" }
|
Depends { name: "ProjectExplorer" }
|
||||||
Depends { name: "QmlDebug" }
|
Depends { name: "QmlDebug" }
|
||||||
Depends { name: "QtSupport" }
|
Depends { name: "QtSupport" }
|
||||||
|
|||||||
@@ -15,10 +15,6 @@ QtcPlugin {
|
|||||||
Depends { name: "Qt.network" }
|
Depends { name: "Qt.network" }
|
||||||
Depends { name: "Qt.widgets" }
|
Depends { name: "Qt.widgets" }
|
||||||
|
|
||||||
cpp.includePaths: base.concat([
|
|
||||||
project.sharedSourcesDir,
|
|
||||||
])
|
|
||||||
|
|
||||||
files: [
|
files: [
|
||||||
"androidextralibrarylistmodel.cpp",
|
"androidextralibrarylistmodel.cpp",
|
||||||
"androidextralibrarylistmodel.h",
|
"androidextralibrarylistmodel.h",
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ Project {
|
|||||||
Depends { name: "Utils" }
|
Depends { name: "Utils" }
|
||||||
|
|
||||||
Depends { name: "Core" }
|
Depends { name: "Core" }
|
||||||
|
Depends { name: "ProParser" }
|
||||||
Depends { name: "ProjectExplorer" }
|
Depends { name: "ProjectExplorer" }
|
||||||
Depends { name: "QtSupport" }
|
Depends { name: "QtSupport" }
|
||||||
Depends { name: "CppTools" }
|
Depends { name: "CppTools" }
|
||||||
@@ -108,8 +109,7 @@ Project {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Export {
|
Export {
|
||||||
Depends { name: "cpp" }
|
Depends { name: "ProParser" }
|
||||||
cpp.includePaths: [project.sharedSourcesDir]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,50 +11,10 @@ Project {
|
|||||||
Depends { name: "Utils" }
|
Depends { name: "Utils" }
|
||||||
|
|
||||||
Depends { name: "Core" }
|
Depends { name: "Core" }
|
||||||
|
Depends { name: "ProParser" }
|
||||||
Depends { name: "ProjectExplorer" }
|
Depends { name: "ProjectExplorer" }
|
||||||
Depends { name: "CppTools" }
|
Depends { name: "CppTools" }
|
||||||
|
|
||||||
cpp.includePaths: base.concat([
|
|
||||||
project.sharedSourcesDir,
|
|
||||||
])
|
|
||||||
|
|
||||||
cpp.defines: base.concat([
|
|
||||||
"QMAKE_AS_LIBRARY",
|
|
||||||
"QMAKE_LIBRARY",
|
|
||||||
"PROPARSER_THREAD_SAFE",
|
|
||||||
"PROEVALUATOR_THREAD_SAFE",
|
|
||||||
"PROEVALUATOR_CUMULATIVE",
|
|
||||||
"QMAKE_BUILTIN_PRFS",
|
|
||||||
"PROEVALUATOR_SETENV"
|
|
||||||
])
|
|
||||||
|
|
||||||
Group {
|
|
||||||
name: "Shared"
|
|
||||||
prefix: project.sharedSourcesDir + "/proparser/"
|
|
||||||
files: [
|
|
||||||
"ioutils.cpp",
|
|
||||||
"ioutils.h",
|
|
||||||
"profileevaluator.cpp",
|
|
||||||
"profileevaluator.h",
|
|
||||||
"proitems.cpp",
|
|
||||||
"proitems.h",
|
|
||||||
"proparser.qrc",
|
|
||||||
"prowriter.cpp",
|
|
||||||
"prowriter.h",
|
|
||||||
"qmake_global.h",
|
|
||||||
"qmakebuiltins.cpp",
|
|
||||||
"qmakeevaluator.cpp",
|
|
||||||
"qmakeevaluator.h",
|
|
||||||
"qmakeevaluator_p.h",
|
|
||||||
"qmakeglobals.cpp",
|
|
||||||
"qmakeglobals.h",
|
|
||||||
"qmakeparser.cpp",
|
|
||||||
"qmakeparser.h",
|
|
||||||
"qmakevfs.cpp",
|
|
||||||
"qmakevfs.h",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
files: [
|
files: [
|
||||||
"baseqtversion.cpp",
|
"baseqtversion.cpp",
|
||||||
"baseqtversion.h",
|
"baseqtversion.h",
|
||||||
@@ -120,18 +80,5 @@ Project {
|
|||||||
"gettingstartedwelcomepage.h"
|
"gettingstartedwelcomepage.h"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Export {
|
|
||||||
cpp.includePaths: "../../shared"
|
|
||||||
cpp.defines: [
|
|
||||||
"QMAKE_AS_LIBRARY",
|
|
||||||
"PROPARSER_THREAD_SAFE",
|
|
||||||
"PROEVALUATOR_CUMULATIVE",
|
|
||||||
"PROEVALUATOR_THREAD_SAFE",
|
|
||||||
"QMAKE_BUILTIN_PRFS",
|
|
||||||
"PROEVALUATOR_SETENV"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
62
src/shared/proparser/proparser.qbs
Normal file
62
src/shared/proparser/proparser.qbs
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
import qbs
|
||||||
|
|
||||||
|
Project {
|
||||||
|
name: "ProParser"
|
||||||
|
|
||||||
|
QtcDevHeaders { }
|
||||||
|
|
||||||
|
// Built as required by the QtSupport plugin. Other potential users need to include the sources
|
||||||
|
// directly.
|
||||||
|
QtcProduct {
|
||||||
|
type: ["staticlibrary", "qtc.dev-module"]
|
||||||
|
install: qtc.make_dev_package
|
||||||
|
installDir: qtc.ide_library_path
|
||||||
|
installTags: ["staticlibrary"]
|
||||||
|
|
||||||
|
cpp.defines: base.concat([
|
||||||
|
"QMAKE_BUILTIN_PRFS",
|
||||||
|
"QMAKE_AS_LIBRARY",
|
||||||
|
"PROPARSER_THREAD_SAFE",
|
||||||
|
"PROEVALUATOR_THREAD_SAFE",
|
||||||
|
"PROEVALUATOR_CUMULATIVE",
|
||||||
|
"PROEVALUATOR_SETENV",
|
||||||
|
])
|
||||||
|
|
||||||
|
Depends { name: "Qt.xml" }
|
||||||
|
|
||||||
|
Export {
|
||||||
|
Depends { name: "cpp" }
|
||||||
|
cpp.defines: base.concat([
|
||||||
|
"QMAKE_AS_LIBRARY",
|
||||||
|
"PROPARSER_THREAD_SAFE",
|
||||||
|
"PROEVALUATOR_THREAD_SAFE",
|
||||||
|
"PROEVALUATOR_CUMULATIVE",
|
||||||
|
"PROEVALUATOR_SETENV",
|
||||||
|
])
|
||||||
|
cpp.includePaths: base.concat([".."])
|
||||||
|
}
|
||||||
|
|
||||||
|
files: [
|
||||||
|
"ioutils.cpp",
|
||||||
|
"ioutils.h",
|
||||||
|
"profileevaluator.cpp",
|
||||||
|
"profileevaluator.h",
|
||||||
|
"proitems.cpp",
|
||||||
|
"proitems.h",
|
||||||
|
"proparser.qrc",
|
||||||
|
"prowriter.cpp",
|
||||||
|
"prowriter.h",
|
||||||
|
"qmake_global.h",
|
||||||
|
"qmakebuiltins.cpp",
|
||||||
|
"qmakeevaluator.cpp",
|
||||||
|
"qmakeevaluator.h",
|
||||||
|
"qmakeevaluator_p.h",
|
||||||
|
"qmakeglobals.cpp",
|
||||||
|
"qmakeglobals.h",
|
||||||
|
"qmakeparser.cpp",
|
||||||
|
"qmakeparser.h",
|
||||||
|
"qmakevfs.cpp",
|
||||||
|
"qmakevfs.h",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -8,10 +8,11 @@ Project {
|
|||||||
references: [
|
references: [
|
||||||
"app/app.qbs",
|
"app/app.qbs",
|
||||||
"app/app_version_header.qbs",
|
"app/app_version_header.qbs",
|
||||||
project.sharedSourcesDir + "/json",
|
|
||||||
"libs/libs.qbs",
|
"libs/libs.qbs",
|
||||||
"plugins/plugins.qbs",
|
"plugins/plugins.qbs",
|
||||||
"tools/tools.qbs"
|
"tools/tools.qbs",
|
||||||
|
project.sharedSourcesDir + "/json",
|
||||||
|
project.sharedSourcesDir + "/proparser",
|
||||||
]
|
]
|
||||||
|
|
||||||
property bool qbsSubModuleExists: File.exists(qbsProject.qbsBaseDir + "/qbs.qbs")
|
property bool qbsSubModuleExists: File.exists(qbsProject.qbsBaseDir + "/qbs.qbs")
|
||||||
|
|||||||
Reference in New Issue
Block a user