aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Komissarov <abbapoh@gmail.com>2020-12-11 11:16:51 +0100
committerIvan Komissarov <ABBAPOH@gmail.com>2020-12-11 10:40:55 +0000
commit647ad9092207f0d317c3f3ac70fd8810d7929462 (patch)
treee9f1ac262bb295fdde191e27d08f6ca14449463c
parent728c5d40fb7c4137810658a86e4b90f0499368ce (diff)
cmake: Pass python3 from CMake to Qbs
...to avoid fuss with possibly different Python versions found by CMake and Qbs Change-Id: I887f8aed8ed52b2766c0c1c411525b433b21458a Reviewed-by: Eike Ziller <eike.ziller@qt.io>
-rw-r--r--doc/CMakeLists.txt1
-rw-r--r--doc/doc.qbs6
2 files changed, 4 insertions, 3 deletions
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index e12520208..74d71f4dc 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -58,6 +58,7 @@ if (QBS_INSTALL_HTML_DOCS OR QBS_INSTALL_QCH_DOCS)
project.withCode:false
project.withDocumentation:true
profile:none
+ "products.qbs documentation.pythonPath:${Python3_EXECUTABLE}"
modules.qbsbuildconfig.installHtml:${_INSTALL_HTML_DOCS}
modules.qbsbuildconfig.installQch:${_INSTALL_QCH_DOCS}
moduleProviders.Qt.qmakeFilePaths:${_QT_QMAKE_EXECUTABLE}
diff --git a/doc/doc.qbs b/doc/doc.qbs
index 8d7da8d04..8ab6cfdb9 100644
--- a/doc/doc.qbs
+++ b/doc/doc.qbs
@@ -21,7 +21,7 @@ Project {
id: pythonProbe
names: ["python3", "python"] // on Windows, there's no python3
}
- property string _pythonExe: pythonProbe.found ? pythonProbe.filePath : undefined
+ property string pythonPath: pythonProbe.found ? pythonProbe.filePath : undefined
files: [
"../README.md",
@@ -66,11 +66,11 @@ Project {
outputFileTags: ["qdoc-html", "qbsdoc.dummy"] // TODO: Hack. Rule injection to the rescue?
outputArtifacts: [{filePath: "dummy", fileTags: ["qbsdoc.dummy"]}]
prepare: {
- if (!product._pythonExe)
+ if (!product.pythonPath)
throw "Python executable was not found";
var scriptPath = explicitlyDependsOn["qbsdoc.fiximports"][0].filePath;
var htmlDir = FileInfo.path(FileInfo.path(inputs["qdoc-png"][0].filePath));
- var fixCmd = new Command(product._pythonExe, [scriptPath, htmlDir]);
+ var fixCmd = new Command(product.pythonPath, [scriptPath, htmlDir]);
fixCmd.description = "fixing bogus QML import statements";
return [fixCmd];
}