summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-03-15 11:07:42 +0100
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-03-15 11:07:42 +0100
commitf1391564f6119973f46f0792b77fa65210ef00ae (patch)
tree763c1856aca22803092bdfe8649940fc37ec7cb8 /src
parenta7aaa84f0c18c150e7d7671663a175d99cad3d49 (diff)
parentb0147a5d79ce7a7e77a24f36aaddfacb1a1517c8 (diff)
Merge remote-tracking branch 'origin/5.12.2' into 5.12
Diffstat (limited to 'src')
-rw-r--r--src/qdoc/configure.json5
-rw-r--r--src/qdoc/configure.pri15
2 files changed, 15 insertions, 5 deletions
diff --git a/src/qdoc/configure.json b/src/qdoc/configure.json
index 6b757737c..f7190fcb3 100644
--- a/src/qdoc/configure.json
+++ b/src/qdoc/configure.json
@@ -28,8 +28,9 @@
"message": "QDoc will not be compiled, probably because libclang could not be located. This means that you cannot build the Qt documentation.
Either ensure that llvm-config is in your PATH environment variable, or set LLVM_INSTALL_DIR to the location of your llvm installation.
-On Linux systems you may be able to install libclang from a package. On macOS you could use Homebrew's llvm package.
-On Windows you need to set LLVM_INSTALL_DIR to the installation path."
+On Linux systems, you may be able to install libclang by installing the libclang-dev or libclang-devel package, depending on your distribution.
+On macOS, you can use Homebrew's llvm package.
+On Windows, you must set LLVM_INSTALL_DIR to the installation path."
}
],
"summary": [
diff --git a/src/qdoc/configure.pri b/src/qdoc/configure.pri
index 8fd43401a..c69ed4edb 100644
--- a/src/qdoc/configure.pri
+++ b/src/qdoc/configure.pri
@@ -57,6 +57,7 @@ defineTest(qtConfTest_libclang) {
# Assume libclang is installed on the target system
isEmpty(LLVM_INSTALL_DIR) {
llvmConfigCandidates = \
+ llvm-config-8 \
llvm-config-7 \
llvm-config-6.0 \
llvm-config-5.0 \
@@ -67,9 +68,17 @@ defineTest(qtConfTest_libclang) {
for (candidate, llvmConfigCandidates) {
LLVM_INSTALL_DIR = $$system("$$candidate --prefix 2>$$QMAKE_SYSTEM_NULL_DEVICE")
!isEmpty(LLVM_INSTALL_DIR) {
- qtLog("Using Clang installation found in $${LLVM_INSTALL_DIR}." \
- "Set the LLVM_INSTALL_DIR environment variable to override.")
- break()
+ CLANG_INCLUDEPATH = $$system("$$candidate --includedir 2>/dev/null")
+ LIBCLANG_MAIN_HEADER = $$CLANG_INCLUDEPATH/clang-c/Index.h
+ !exists($$LIBCLANG_MAIN_HEADER) {
+ !isEmpty(LLVM_INSTALL_DIR): \
+ qtLog("Cannot find libclang's main header file, candidate: $${LIBCLANG_MAIN_HEADER}.")
+ continue
+ } else {
+ qtLog("Using Clang installation found in $${LLVM_INSTALL_DIR}." \
+ "Set the LLVM_INSTALL_DIR environment variable to override.")
+ break()
+ }
}
}
}