Skip to content

Commit

Permalink
Fix project resolving with qbs master.
Browse files Browse the repository at this point in the history
Change-Id: Iee12398a4897d795ea5b8b6cadfec8f234ba069d
Reviewed-by: Joerg Bornemann <[email protected]>
  • Loading branch information
Christian Kandeler committed Mar 22, 2016
1 parent 75bbd73 commit 0bbd8a8
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 18 deletions.
5 changes: 3 additions & 2 deletions qbs/imports/QtcClangInstallation/functions.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
var Environment = loadExtension("qbs.Environment")
var File = loadExtension("qbs.File")
var MinimumLLVMVersion = "3.6.2"

Expand All @@ -13,7 +14,7 @@ function isSuitableLLVMConfig(llvmConfigCandidate, qtcFunctions, processOutputRe

function llvmConfig(qbs, qtcFunctions, processOutputReader)
{
var llvmInstallDirFromEnv = qbs.getEnv("LLVM_INSTALL_DIR")
var llvmInstallDirFromEnv = Environment.getEnv("LLVM_INSTALL_DIR")
var llvmConfigVariants = [
"llvm-config", "llvm-config-3.2", "llvm-config-3.3", "llvm-config-3.4",
"llvm-config-3.5", "llvm-config-3.6", "llvm-config-4.0", "llvm-config-4.1"
Expand All @@ -30,7 +31,7 @@ function llvmConfig(qbs, qtcFunctions, processOutputReader)
}

// Find llvm-config* in PATH
var pathListString = qbs.getEnv("PATH");
var pathListString = Environment.getEnv("PATH");
var separator = qbs.hostOS.contains("windows") ? ";" : ":";
var pathList = pathListString.split(separator);
for (var i = 0; i < llvmConfigVariants.length; ++i) {
Expand Down
3 changes: 2 additions & 1 deletion qtcreator.qbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import qbs 1.0
import qbs.Environment
import qbs.FileInfo

Project {
Expand Down Expand Up @@ -51,7 +52,7 @@ Project {
property string ide_bin_path: qbs.targetOS.contains("osx")
? ide_app_target + ".app/Contents/MacOS"
: ide_app_path
property bool testsEnabled: qbs.getEnv("TEST") || qbs.buildVariant === "debug"
property bool testsEnabled: Environment.getEnv("TEST") || qbs.buildVariant === "debug"
property stringList generalDefines: [
"QT_CREATOR",
'IDE_LIBRARY_BASENAME="' + libDirName + '"',
Expand Down
25 changes: 13 additions & 12 deletions src/libs/qtcreatorcdbext/qtcreatorcdbext.qbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import qbs
import qbs.Environment
import qbs.File
import qbs.FileInfo

Expand All @@ -8,18 +9,18 @@ QtcLibrary {
targetName: name
property string cdbPath: {
var paths = [
qbs.getEnv("CDB_PATH"),
qbs.getEnv("ProgramFiles") + "/Debugging Tools For Windows/sdk",
qbs.getEnv("ProgramFiles") + "/Debugging Tools For Windows (x86)/sdk",
qbs.getEnv("ProgramFiles") + "/Debugging Tools For Windows (x64)/sdk",
qbs.getEnv("ProgramFiles") + "/Debugging Tools For Windows 64-bit/sdk",
qbs.getEnv("ProgramW6432") + "/Debugging Tools For Windows (x86)/sdk",
qbs.getEnv("ProgramW6432") + "/Debugging Tools For Windows (x64)/sdk",
qbs.getEnv("ProgramW6432") + "/Debugging Tools For Windows 64-bit/sdk",
qbs.getEnv("ProgramFiles") + "/Windows Kits/8.0/Debuggers",
qbs.getEnv("ProgramFiles") + "/Windows Kits/8.1/Debuggers",
qbs.getEnv("ProgramFiles(x86)") + "/Windows Kits/8.0/Debuggers/inc",
qbs.getEnv("ProgramFiles(x86)") + "/Windows Kits/8.1/Debuggers/inc"
Environment.getEnv("CDB_PATH"),
Environment.getEnv("ProgramFiles") + "/Debugging Tools For Windows/sdk",
Environment.getEnv("ProgramFiles") + "/Debugging Tools For Windows (x86)/sdk",
Environment.getEnv("ProgramFiles") + "/Debugging Tools For Windows (x64)/sdk",
Environment.getEnv("ProgramFiles") + "/Debugging Tools For Windows 64-bit/sdk",
Environment.getEnv("ProgramW6432") + "/Debugging Tools For Windows (x86)/sdk",
Environment.getEnv("ProgramW6432") + "/Debugging Tools For Windows (x64)/sdk",
Environment.getEnv("ProgramW6432") + "/Debugging Tools For Windows 64-bit/sdk",
Environment.getEnv("ProgramFiles") + "/Windows Kits/8.0/Debuggers",
Environment.getEnv("ProgramFiles") + "/Windows Kits/8.1/Debuggers",
Environment.getEnv("ProgramFiles(x86)") + "/Windows Kits/8.0/Debuggers/inc",
Environment.getEnv("ProgramFiles(x86)") + "/Windows Kits/8.1/Debuggers/inc"
];
var c = paths.length;
for (var i = 0; i < c; ++i) {
Expand Down
3 changes: 2 additions & 1 deletion src/libs/ssh/ssh.qbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import qbs 1.0
import qbs.Environment

QtcLibrary {
name: "QtcSsh"
Expand Down Expand Up @@ -46,7 +47,7 @@ QtcLibrary {
"sshsendfacility.cpp", "sshsendfacility_p.h",
].concat(botanFiles)

property var useSystemBotan: qbs.getEnv("USE_SYSTEM_BOTAN") === "1"
property var useSystemBotan: Environment.getEnv("USE_SYSTEM_BOTAN") === "1"
property var botanIncludes: {
var result = ["../3rdparty"];
if (useSystemBotan)
Expand Down
3 changes: 2 additions & 1 deletion src/src.qbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import qbs
import qbs.Environment
import qbs.File
import qbs.FileInfo

Expand All @@ -14,7 +15,7 @@ Project {
]

property bool qbsSubModuleExists: File.exists(qbsProject.qbsBaseDir + "/qbs.qbs")
property path qbs_install_dir: qbs.getEnv("QBS_INSTALL_DIR")
property path qbs_install_dir: Environment.getEnv("QBS_INSTALL_DIR")
property bool useExternalQbs: qbs_install_dir
property bool buildQbsProjectManager: useExternalQbs || qbsSubModuleExists
Project {
Expand Down
5 changes: 4 additions & 1 deletion src/tools/cplusplustools.qbs
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import qbs
import qbs.Environment

Project {
name: "CPlusPlus Tools"
condition: qbs.getEnv("BUILD_CPLUSPLUS_TOOLS")
condition: Environment.getEnv("BUILD_CPLUSPLUS_TOOLS")
references: [
"cplusplus-ast2png/cplusplus-ast2png.qbs",
"cplusplus-frontend/cplusplus-frontend.qbs",
Expand Down

0 comments on commit 0bbd8a8

Please sign in to comment.