diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2019-05-23 19:17:07 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2019-05-23 19:17:07 +0200 |
commit | 4a12d020600643d6fcbf65a3da7bc1c21fda6970 (patch) | |
tree | fe5f3c8061530d9ac49a6cc54377ed1ef87915b0 /share/qbs | |
parent | eb78330fcf98e56968ae5d436d17bc114b8a4890 (diff) | |
parent | 8cd4b8cec7ffda0b19b01129e96eda8d2fb75ec0 (diff) |
Merge 1.13 into master
Change-Id: Ic8e80604deb03e48fe264271de2e0add5023af87
Diffstat (limited to 'share/qbs')
-rw-r--r-- | share/qbs/imports/qbs/DarwinTools/darwin-tools.js | 2 | ||||
-rw-r--r-- | share/qbs/module-providers/Qt/setup-qt.js | 36 | ||||
-rw-r--r-- | share/qbs/modules/bundle/BundleModule.qbs | 3 | ||||
-rw-r--r-- | share/qbs/modules/cpp/DarwinGCC.qbs | 11 |
4 files changed, 36 insertions, 16 deletions
diff --git a/share/qbs/imports/qbs/DarwinTools/darwin-tools.js b/share/qbs/imports/qbs/DarwinTools/darwin-tools.js index 01aa41ddf..889720fcd 100644 --- a/share/qbs/imports/qbs/DarwinTools/darwin-tools.js +++ b/share/qbs/imports/qbs/DarwinTools/darwin-tools.js @@ -78,7 +78,7 @@ function targetDevices(targetOS) { function targetedDeviceFamily(deviceNames) { return deviceNames.map(function (deviceName) { return appleDeviceNumber(deviceName); - }).join(","); + }); } /** diff --git a/share/qbs/module-providers/Qt/setup-qt.js b/share/qbs/module-providers/Qt/setup-qt.js index b3044d72e..0206a16d3 100644 --- a/share/qbs/module-providers/Qt/setup-qt.js +++ b/share/qbs/module-providers/Qt/setup-qt.js @@ -226,6 +226,7 @@ function getQtProperties(qmakeFilePath, qbs) { qtProps.documentationPath = pathQueryValue(queryResult, "QT_INSTALL_DOCS"); qtProps.includePath = pathQueryValue(queryResult, "QT_INSTALL_HEADERS"); qtProps.libraryPath = pathQueryValue(queryResult, "QT_INSTALL_LIBS"); + qtProps.hostLibraryPath = pathQueryValue(queryResult, "QT_HOST_LIBS"); qtProps.binaryPath = pathQueryValue(queryResult, "QT_HOST_BINS") || pathQueryValue(queryResult, "QT_INSTALL_BINS"); qtProps.documentationPath = pathQueryValue(queryResult, "QT_INSTALL_DOCS"); @@ -417,8 +418,10 @@ function makeQtModuleInfo(name, qbsName, deps) { moduleInfo.name = ""; moduleInfo.qbsName = qbsName; // Lower-case version without "qt" prefix. moduleInfo.dependencies = deps || []; // qbs names. - if (moduleInfo.qbsName !== "core" && !moduleInfo.dependencies.contains("core")) + if (moduleInfo.qbsName && moduleInfo.qbsName !== "core" + && !moduleInfo.dependencies.contains("core")) { moduleInfo.dependencies.unshift("core"); + } moduleInfo.isPrivate = qbsName && qbsName.endsWith("-private"); moduleInfo.hasLibrary = !moduleInfo.isPrivate; moduleInfo.isStaticLibrary = false; @@ -441,6 +444,7 @@ function makeQtModuleInfo(name, qbsName, deps) { moduleInfo.frameworkPathsDebug = []; moduleInfo.frameworkPathsRelease = []; moduleInfo.libraryPaths = []; + moduleInfo.libDir = ""; moduleInfo.config = []; moduleInfo.supportedPluginTypes = []; moduleInfo.pluginData = makePluginData(); @@ -626,7 +630,7 @@ function doSetupLibraries(modInfo, qtProps, debugBuild, nonExistingPrlFiles) { } var prlFilePath = modInfo.isPlugin ? FileInfo.joinPaths(qtProps.pluginPath, modInfo.pluginData.type) - : qtProps.libraryPath; + : (modInfo.libDir ? modInfo.libDir : qtProps.libraryPath); if (isFramework(modInfo, qtProps)) { prlFilePath = FileInfo.joinPaths(prlFilePath, libraryBaseName(modInfo, qtProps, false) + ".framework"); @@ -921,7 +925,7 @@ function extractPaths(rhs, filePath) { function removeDuplicatedDependencyLibs(modules) { var revDeps = {}; - var currentPath; + var currentPath = []; var getLibraries; var getLibFilePath; @@ -935,9 +939,9 @@ function removeDuplicatedDependencyLibs(modules) { var depmod = moduleByName[module.dependencies[j]]; if (!depmod) continue; - if (!revDeps[depmod]) - revDeps[depmod] = []; - revDeps[depmod].push(module); + if (!revDeps[depmod.qbsName]) + revDeps[depmod.qbsName] = []; + revDeps[depmod.qbsName].push(module); } } } @@ -946,7 +950,7 @@ function removeDuplicatedDependencyLibs(modules) { var result = []; for (i = 0; i < modules.length; ++i) { var module = modules[i] - if (module.dependencies.lenegth === 0) + if (module.dependencies.length === 0) result.push(module); } return result; @@ -956,7 +960,6 @@ function removeDuplicatedDependencyLibs(modules) { if (currentPath.contains(module)) return; currentPath.push(module); - var moduleLibraryLists = getLibraries(module); for (var i = 0; i < moduleLibraryLists.length; ++i) { var modLibList = moduleLibraryLists[i]; @@ -973,10 +976,11 @@ function removeDuplicatedDependencyLibs(modules) { libs = libs.concat(moduleLibraryLists[i]); libs.sort(); - for (i = 0; i < (revDeps[module] || []).length; ++i) - traverse(revDeps[module][i], libs); + var deps = revDeps[module.qbsName]; + for (i = 0; i < (deps || []).length; ++i) + traverse(deps[i], libs); - m_currentPath.pop(); + currentPath.pop(); } setupReverseDependencies(modules); @@ -1066,8 +1070,18 @@ function allQt5Modules(qtProps) { for (k = 0; k < moduleInfo.includePaths.length; ++k) { moduleInfo.includePaths[k] = moduleInfo.includePaths[k] .replace("$$QT_MODULE_INCLUDE_BASE", qtProps.includePath) + .replace("$$QT_MODULE_HOST_LIB_BASE", qtProps.hostLibraryPath) .replace("$$QT_MODULE_LIB_BASE", qtProps.libraryPath); } + } else if (key.endsWith(".libs")) { + var libDirs = extractPaths(value, priFilePath); + if (libDirs.length === 1) { + moduleInfo.libDir = libDirs[0] + .replace("$$QT_MODULE_HOST_LIB_BASE", qtProps.hostLibraryPath) + .replace("$$QT_MODULE_LIB_BASE", qtProps.libraryPath); + } else { + moduleInfo.libDir = qtProps.libraryPath; + } } else if (key.endsWith(".DEFINES")) { moduleInfo.compilerDefines = splitNonEmpty(value, ' '); } else if (key.endsWith(".VERSION")) { diff --git a/share/qbs/modules/bundle/BundleModule.qbs b/share/qbs/modules/bundle/BundleModule.qbs index ec0062347..f1845fe30 100644 --- a/share/qbs/modules/bundle/BundleModule.qbs +++ b/share/qbs/modules/bundle/BundleModule.qbs @@ -426,7 +426,8 @@ Module { inputs.partial_infoplist[j].filePath) || {}; for (key in partialInfoPlist) { - if (partialInfoPlist.hasOwnProperty(key)) + if (partialInfoPlist.hasOwnProperty(key) + && !aggregatePlist.hasOwnProperty(key)) aggregatePlist[key] = partialInfoPlist[key]; } } diff --git a/share/qbs/modules/cpp/DarwinGCC.qbs b/share/qbs/modules/cpp/DarwinGCC.qbs index 0bd294fb4..8f3fe72fc 100644 --- a/share/qbs/modules/cpp/DarwinGCC.qbs +++ b/share/qbs/modules/cpp/DarwinGCC.qbs @@ -118,8 +118,12 @@ UnixGCC { dict["LSRequiresIPhoneOS"] = true; if (xcode.platformType === "device") { - if (qbs.targetOS.contains("ios")) - dict["UIRequiredDeviceCapabilities"] = ["armv7"]; + if (qbs.targetOS.contains("ios")) { + if (qbs.architecture === "arm64") + dict["UIRequiredDeviceCapabilities"] = ["arm64"]; + else + dict["UIRequiredDeviceCapabilities"] = ["armv7"]; + } if (qbs.targetOS.contains("tvos")) dict["UIRequiredDeviceCapabilities"] = ["arm64"]; @@ -195,7 +199,8 @@ UnixGCC { env["TVOS_DEPLOYMENT_TARGET"] = minimumTvosVersion; if (xcode.present) - env["TARGETED_DEVICE_FAMILY"] = DarwinTools.targetedDeviceFamily(xcode.targetDevices); + env["TARGETED_DEVICE_FAMILY"] = + DarwinTools.targetedDeviceFamily(xcode.targetDevices).join(","); return env; } |