summaryrefslogtreecommitdiff
path: root/share/qbs
diff options
context:
space:
mode:
authorIvan Komissarov <abbapoh@gmail.com>2021-02-19 10:57:25 +0100
committerIvan Komissarov <abbapoh@gmail.com>2021-02-19 10:57:25 +0100
commit36f139c4f405e057baa768e4728704b22de6519d (patch)
tree4b554ff21e92698c185d0683b50c7cd742c18817 /share/qbs
parent2bc823ec00cec8a1d58981710eb50ba85b4f58d7 (diff)
parent7b50dca83a5a75a5c24b5ef329f25990daf2ff50 (diff)
downloadqbs-36f139c4f405e057baa768e4728704b22de6519d.tar.gz
Merge branch '1.18'
Change-Id: I4e437865514add88558f66420718bc02fb39e41d
Diffstat (limited to 'share/qbs')
-rw-r--r--share/qbs/imports/qbs/Probes/IncludeProbe.qbs2
-rw-r--r--share/qbs/imports/qbs/Probes/LibraryProbe.qbs2
-rw-r--r--share/qbs/imports/qbs/Probes/XcodeLocationProbe.qbs47
-rw-r--r--share/qbs/module-providers/Qt/setup-qt.js2
-rw-r--r--share/qbs/modules/java/JavaModule.qbs8
-rw-r--r--share/qbs/modules/xcode/xcode.qbs9
6 files changed, 66 insertions, 4 deletions
diff --git a/share/qbs/imports/qbs/Probes/IncludeProbe.qbs b/share/qbs/imports/qbs/Probes/IncludeProbe.qbs
index 3c1059e64..6201cbc55 100644
--- a/share/qbs/imports/qbs/Probes/IncludeProbe.qbs
+++ b/share/qbs/imports/qbs/Probes/IncludeProbe.qbs
@@ -32,6 +32,8 @@ PathProbe {
platformSearchPaths: qbs.targetOS.contains("unix") ? [
"/usr/include",
"/usr/local/include",
+ "/include",
+ "/app/include",
] : []
platformEnvironmentPaths: {
if (qbs.toolchain.contains('msvc'))
diff --git a/share/qbs/imports/qbs/Probes/LibraryProbe.qbs b/share/qbs/imports/qbs/Probes/LibraryProbe.qbs
index 0f4220730..7631eb441 100644
--- a/share/qbs/imports/qbs/Probes/LibraryProbe.qbs
+++ b/share/qbs/imports/qbs/Probes/LibraryProbe.qbs
@@ -60,7 +60,7 @@ PathProbe {
else if (qbs.architecture === "x86")
result = ["/usr/lib32", "/usr/lib/i386-linux-gnu"]
}
- result = result.concat(["/usr/lib", "/usr/local/lib"]);
+ result = result.concat(["/usr/lib", "/usr/local/lib", "/lib", "/app/lib"]);
}
return result;
diff --git a/share/qbs/imports/qbs/Probes/XcodeLocationProbe.qbs b/share/qbs/imports/qbs/Probes/XcodeLocationProbe.qbs
new file mode 100644
index 000000000..3401315f7
--- /dev/null
+++ b/share/qbs/imports/qbs/Probes/XcodeLocationProbe.qbs
@@ -0,0 +1,47 @@
+/****************************************************************************
+**
+** Copyright (C) 2020 Ivan Komissarov (abbapoh@gmail.com)
+** Contact: http://www.qt.io/licensing
+**
+** This file is part of Qbs.
+**
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms and
+** conditions see http://www.qt.io/terms-conditions. For further information
+** use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+****************************************************************************/
+
+import qbs.Process
+
+Probe {
+ property path developerPath
+ configure: {
+ var p = new Process();
+ try {
+ p.exec("/usr/bin/xcode-select", ["--print-path"], true);
+ developerPath = p.readStdOut().trim();
+ } catch (e) {
+ developerPath = "/Applications/Xcode.app/Contents/Developer";
+ } finally {
+ p.close();
+ found = true;
+ }
+ }
+}
diff --git a/share/qbs/module-providers/Qt/setup-qt.js b/share/qbs/module-providers/Qt/setup-qt.js
index a67f79d89..70acc753c 100644
--- a/share/qbs/module-providers/Qt/setup-qt.js
+++ b/share/qbs/module-providers/Qt/setup-qt.js
@@ -197,6 +197,8 @@ function fillEntryPointLibs(qtProps, debug) {
var qtMainCandidates = ["qtmain"];
if (isMinGW && qtProps.qtMajorVersion === 5)
qtMainCandidates.push("qt5main");
+ if (qtProps.qtMajorVersion === 6)
+ qtMainCandidates.push("Qt6EntryPoint");
for (var i = 0; i < qtMainCandidates.length; ++i) {
var baseNameCandidate = qtMainCandidates[i];
diff --git a/share/qbs/modules/java/JavaModule.qbs b/share/qbs/modules/java/JavaModule.qbs
index c3efb15bf..ceb29f36f 100644
--- a/share/qbs/modules/java/JavaModule.qbs
+++ b/share/qbs/modules/java/JavaModule.qbs
@@ -234,14 +234,18 @@ Module {
inputsFromDependencies: ["java.jar"]
explicitlyDependsOn: ["java.class-internal"]
- outputFileTags: ["java.class"].concat(_tagJniHeaders ? ["hpp"] : []) // Annotations can produce additional java source files. Ignored for now.
+ outputFileTags: ["java.class"].concat(_tagJniHeaders ? ["hpp"] : ["java.jni-hpp"]) // Annotations can produce additional java source files. Ignored for now.
outputArtifacts: {
var artifacts = JavaUtils.outputArtifacts(product, inputs);
if (!product.java._tagJniHeaders) {
for (var i = 0; i < artifacts.length; ++i) {
var a = artifacts[i];
if (a.fileTags instanceof Array)
- a.fileTags = a.fileTags.filter(function(tag) { return tag != "hpp"; });
+ a.fileTags = a.fileTags.map(function(tag) {
+ if (tag === "hpp")
+ return "java.jni-hpp";
+ return tag;
+ });
}
}
return artifacts;
diff --git a/share/qbs/modules/xcode/xcode.qbs b/share/qbs/modules/xcode/xcode.qbs
index 72120ed37..6c0584c81 100644
--- a/share/qbs/modules/xcode/xcode.qbs
+++ b/share/qbs/modules/xcode/xcode.qbs
@@ -11,6 +11,11 @@ import qbs.Utilities
Module {
id: xcodeModule
+ Probes.XcodeLocationProbe {
+ id: xcodeLocationProbe
+ condition: !xcodeModule.developerPath
+ }
+
Probes.XcodeProbe {
id: xcodeProbe
developerPath: xcodeModule.developerPath
@@ -26,7 +31,9 @@ Module {
version: xcodeProbe.xcodeVersion
- property path developerPath: "/Applications/Xcode.app/Contents/Developer"
+ property path developerPath: xcodeLocationProbe.found
+ ? xcodeLocationProbe.developerPath
+ : undefined
property string sdk: DarwinTools.applePlatformName(qbs.targetOS, platformType)
property stringList targetDevices: DarwinTools.targetDevices(qbs.targetOS)