Commit 05f8a2c8 authored by Christian Kandeler's avatar Christian Kandeler

qbs build: Introduce convenience project property sharedSourcesDir.

Change-Id: I69aacc7391e6e25e66eae1fb54b3c1cfb18679ee
Reviewed-by: default avatarJoerg Bornemann <joerg.bornemann@theqtcompany.com>
parent 64be0004
...@@ -18,6 +18,7 @@ Project { ...@@ -18,6 +18,7 @@ Project {
property pathList additionalLibs: [] property pathList additionalLibs: []
property pathList additionalTools: [] property pathList additionalTools: []
property pathList additionalAutotests: [] property pathList additionalAutotests: []
property string sharedSourcesDir: path + "/src/shared"
property string libDirName: "lib" property string libDirName: "lib"
property string ide_library_path: { property string ide_library_path: {
if (qbs.targetOS.contains("osx")) if (qbs.targetOS.contains("osx"))
......
...@@ -8,8 +8,8 @@ QtcProduct { ...@@ -8,8 +8,8 @@ QtcProduct {
cpp.rpaths: qbs.targetOS.contains("osx") ? ["@executable_path/.."] cpp.rpaths: qbs.targetOS.contains("osx") ? ["@executable_path/.."]
: ["$ORIGIN/../" + project.libDirName + "/qtcreator"] : ["$ORIGIN/../" + project.libDirName + "/qtcreator"]
cpp.includePaths: [ cpp.includePaths: [
"../shared/qtsingleapplication", project.sharedSourcesDir + "/qtsingleapplication",
"../shared/qtlockedfile", project.sharedSourcesDir + "/qtlockedfile",
] ]
Depends { name: "app_version_header" } Depends { name: "app_version_header" }
......
...@@ -9,7 +9,7 @@ QtcPlugin { ...@@ -9,7 +9,7 @@ QtcPlugin {
Depends { name: "Core" } Depends { name: "Core" }
Depends { name: "TextEditor" } Depends { name: "TextEditor" }
cpp.includePaths: base.concat("../../shared/cpaster") cpp.includePaths: base.concat([project.sharedSourcesDir + "/cpaster"])
files: [ files: [
"columnindicatortextedit.cpp", "columnindicatortextedit.cpp",
......
...@@ -17,7 +17,7 @@ QtcPlugin { ...@@ -17,7 +17,7 @@ QtcPlugin {
Depends { name: "ProjectExplorer" } Depends { name: "ProjectExplorer" }
Depends { name: "TextEditor" } Depends { name: "TextEditor" }
cpp.includePaths: base.concat(["../../shared/registryaccess"]) cpp.includePaths: base.concat([project.sharedSourcesDir + "/registryaccess"])
pluginRecommends: [ pluginRecommends: [
"CppEditor" "CppEditor"
...@@ -214,7 +214,7 @@ QtcPlugin { ...@@ -214,7 +214,7 @@ QtcPlugin {
Group { Group {
name: "RegistryAccess" name: "RegistryAccess"
condition: qbs.targetOS.contains("windows") condition: qbs.targetOS.contains("windows")
prefix: "../../shared/registryaccess/" prefix: project.sharedSourcesDir + "/registryaccess/"
files: [ files: [
"registryaccess.cpp", "registryaccess.cpp",
"registryaccess.h", "registryaccess.h",
......
...@@ -49,7 +49,7 @@ QtcPlugin { ...@@ -49,7 +49,7 @@ QtcPlugin {
Group { Group {
name: "Shared Sources" name: "Shared Sources"
id: sharedSources id: sharedSources
prefix: "../../shared/designerintegrationv2/" prefix: project.sharedSourcesDir + "/designerintegrationv2/"
files: [ files: [
"formresizer.cpp", "formresizer.h", "formresizer.cpp", "formresizer.h",
"sizehandlerect.cpp", "sizehandlerect.h", "sizehandlerect.cpp", "sizehandlerect.h",
......
...@@ -64,7 +64,7 @@ QtcPlugin { ...@@ -64,7 +64,7 @@ QtcPlugin {
Group { Group {
id: sharedSources id: sharedSources
name: "Shared Sources" name: "Shared Sources"
prefix: "../../shared/help/" prefix: project.sharedSourcesDir + "/help/"
files: [ files: [
"bookmarkdialog.ui", "bookmarkdialog.ui",
"bookmarkmanager.cpp", "bookmarkmanager.h", "bookmarkmanager.cpp", "bookmarkmanager.h",
......
...@@ -12,7 +12,6 @@ QtcPlugin { ...@@ -12,7 +12,6 @@ QtcPlugin {
Depends { name: "QmlDebug" } Depends { name: "QmlDebug" }
Depends { name: "Qt"; submodules: ["widgets", "xml", "network"] } Depends { name: "Qt"; submodules: ["widgets", "xml", "network"] }
cpp.includePaths: base.concat("../../shared")
cpp.frameworks: base.concat(qbs.targetOS.contains("osx") ? ["CoreFoundation", "IOKit"] : []) cpp.frameworks: base.concat(qbs.targetOS.contains("osx") ? ["CoreFoundation", "IOKit"] : [])
files: [ files: [
......
...@@ -16,7 +16,7 @@ QtcPlugin { ...@@ -16,7 +16,7 @@ QtcPlugin {
Depends { name: "Qt.widgets" } Depends { name: "Qt.widgets" }
cpp.includePaths: base.concat([ cpp.includePaths: base.concat([
"../../shared", project.sharedSourcesDir,
]) ])
files: [ files: [
......
...@@ -121,4 +121,9 @@ QtcPlugin { ...@@ -121,4 +121,9 @@ QtcPlugin {
"qtquickapp.png", "qtquickapp.png",
] ]
} }
Export {
Depends { name: "cpp" }
cpp.includePaths: [project.sharedSourcesDir]
}
} }
...@@ -13,7 +13,7 @@ QtcPlugin { ...@@ -13,7 +13,7 @@ QtcPlugin {
Depends { name: "CppTools" } Depends { name: "CppTools" }
cpp.includePaths: base.concat([ cpp.includePaths: base.concat([
"../../shared", project.sharedSourcesDir,
]) ])
cpp.defines: base.concat([ cpp.defines: base.concat([
...@@ -28,7 +28,7 @@ QtcPlugin { ...@@ -28,7 +28,7 @@ QtcPlugin {
Group { Group {
name: "Shared" name: "Shared"
prefix: "../../shared/proparser/" prefix: project.sharedSourcesDir + "/proparser/"
files: [ files: [
"ioutils.cpp", "ioutils.cpp",
"ioutils.h", "ioutils.h",
......
...@@ -19,7 +19,7 @@ Project { ...@@ -19,7 +19,7 @@ Project {
Project { Project {
name: "qbs" name: "qbs"
id: qbsProject id: qbsProject
property string qbsBaseDir: path + "/shared/qbs" property string qbsBaseDir: project.sharedSourcesDir + "/qbs"
condition: qbsSubModuleExists && !useExternalQbs condition: qbsSubModuleExists && !useExternalQbs
qbsSearchPaths: [qbsBaseDir + "/qbs-resources"] qbsSearchPaths: [qbsBaseDir + "/qbs-resources"]
......
...@@ -4,7 +4,9 @@ QtcTool { ...@@ -4,7 +4,9 @@ QtcTool {
name: "qtcdebugger" name: "qtcdebugger"
condition: qbs.targetOS.contains("windows") condition: qbs.targetOS.contains("windows")
cpp.includePaths: base.concat(["../../shared/registryaccess"]) property string registryAccessDir: project.sharedSourcesDir + "/registryaccess"
cpp.includePaths: base.concat([registryAccessDir])
cpp.dynamicLibraries: [ cpp.dynamicLibraries: [
"psapi", "psapi",
"advapi32" "advapi32"
...@@ -15,7 +17,7 @@ QtcTool { ...@@ -15,7 +17,7 @@ QtcTool {
files: [ files: [
"main.cpp", "main.cpp",
"../../shared/registryaccess/registryaccess.cpp", registryAccessDir + "/registryaccess.cpp",
"../../shared/registryaccess/registryaccess.h", registryAccessDir + "/registryaccess.h",
] ]
} }
...@@ -4,8 +4,8 @@ QtcAutotest { ...@@ -4,8 +4,8 @@ QtcAutotest {
name: "IoUtils autotest" name: "IoUtils autotest"
Depends { name: "Qt.core" } Depends { name: "Qt.core" }
files: [ files: [
project.ide_source_tree + "/src/shared/proparser/ioutils.cpp", project.sharedSourcesDir + "/proparser/ioutils.cpp",
"tst_ioutils.cpp" "tst_ioutils.cpp"
] ]
cpp.includePaths: base.concat([project.ide_source_tree + "/src/shared"]) cpp.includePaths: base.concat([project.sharedSourcesDir])
} }
...@@ -6,7 +6,7 @@ QtcAutotest { ...@@ -6,7 +6,7 @@ QtcAutotest {
Group { Group {
name: "Sources from ProParser" name: "Sources from ProParser"
id: proParserGroup id: proParserGroup
prefix: project.ide_source_tree + "/src/shared/proparser/" prefix: project.sharedSourcesDir + "/proparser/"
files: [ files: [
"ioutils.h", "ioutils.cpp", "ioutils.h", "ioutils.cpp",
"profileevaluator.h", "profileevaluator.cpp", "profileevaluator.h", "profileevaluator.cpp",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment