forked from qt-creator/qt-creator
qbs build: Fix wrong uses of qbs.toolchainType
qbs.toolchainType is a convenience property to *set* the toolchain in a profile or on the command line. It must not be used to check for the toolchain. Change-Id: I97e3a2baceca4233db97f33b9fa8f2bc61abbcf3 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -8,9 +8,9 @@ QtcLibrary {
|
||||
var libs = [];
|
||||
if (qbs.targetOS.contains("windows")) {
|
||||
libs.push("user32", "iphlpapi", "ws2_32", "shell32", "ole32");
|
||||
if (qbs.toolchainType === "mingw")
|
||||
if (qbs.toolchain.contains("mingw"))
|
||||
libs.push("uuid");
|
||||
else if (qbs.toolchainType === "msvc")
|
||||
else if (qbs.toolchain.contains("msvc"))
|
||||
libs.push("dbghelp");
|
||||
} else if (qbs.targetOS.contains("unix")) {
|
||||
if (!qbs.targetOS.contains("macos"))
|
||||
|
||||
@@ -11,9 +11,7 @@ QtcTool {
|
||||
|
||||
Properties {
|
||||
condition: qbs.targetOS.contains("windows")
|
||||
cpp.dynamicLibraries: {
|
||||
return qbs.toolchainType === "msvc" ? ["user32", "dbghelp"] : ["user32"];
|
||||
}
|
||||
cpp.dynamicLibraries: qbs.toolchain.contains("msvc") ? ["user32", "dbghelp"] : ["user32"]
|
||||
}
|
||||
|
||||
files: [
|
||||
|
||||
@@ -27,7 +27,7 @@ QtcLibrary {
|
||||
var libs = [];
|
||||
if (qbs.targetOS.contains("windows"))
|
||||
libs.push("user32", "shell32");
|
||||
if (qbs.toolchainType === "msvc")
|
||||
if (qbs.toolchain.contains("msvc"))
|
||||
libs.push("dbghelp");
|
||||
return libs;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user