diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2022-12-16 10:33:35 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2022-12-16 22:14:27 +0000 |
commit | abe2265cf6cf3e7f0fbb14f6f19374a338b7b930 (patch) | |
tree | a52c6591fbc63d4737865c6fa875955a0e6a6107 | |
parent | a09e4d78d071cf5f8833d89d19856d9c4a851e20 (diff) | |
download | qttools-abe2265cf6cf3e7f0fbb14f6f19374a338b7b930.tar.gz |
QDoc: Fix documentation and configuration warnings about libclang
The most important thing a user needs to know when installing libclang
on linux is that they need the ClangConfig.cmake file. State that when
we fail to find libclang.
Also, add a note about LLVM_INSTALL_DIR to the documentation. Using
LLVM_INSTALL_DIR is the cleaner option since the configure script should
only look for LLVM-related packages in the LLVM installation.
Change-Id: Iaa26a4e15955b60120f002a34ab8d7a00548a221
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
-rw-r--r-- | configure.cmake | 4 | ||||
-rw-r--r-- | src/qdoc/doc/qdoc-guide/qdoc-guide.qdoc | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/configure.cmake b/configure.cmake index 76ccac16a..e65dfc146 100644 --- a/configure.cmake +++ b/configure.cmake @@ -117,8 +117,10 @@ qt_configure_end_summary_section() # end of "Qt Tools" section qt_configure_add_report_entry( TYPE WARNING MESSAGE "QDoc will not be compiled, probably because libclang could not be located. This means that you cannot build the Qt documentation. -Either set CMAKE_PREFIX_PATH or LLVM_INSTALL_DIR to the location of your llvm installation. +You may need to set CMAKE_PREFIX_PATH or LLVM_INSTALL_DIR to the location of your llvm installation. On Linux systems, you may be able to install libclang by installing the libclang-dev or libclang-devel package, depending on your distribution. +You may need to install another package, such as clang itself, to provide the ClangConfig.cmake file needed to detect your libclang. Once this +file is in place, the configure script may be able to detect your system-installed libclang without further environment variables. On macOS, you can use Homebrew's llvm package. You will also need to set the FEATURE_clang CMake variable to ON to re-evaluate this check." CONDITION NOT QT_FEATURE_clang diff --git a/src/qdoc/doc/qdoc-guide/qdoc-guide.qdoc b/src/qdoc/doc/qdoc-guide/qdoc-guide.qdoc index 3c3075ba6..086cf78ca 100644 --- a/src/qdoc/doc/qdoc-guide/qdoc-guide.qdoc +++ b/src/qdoc/doc/qdoc-guide/qdoc-guide.qdoc @@ -663,6 +663,8 @@ cannot be used, as they miss certain components required by QDoc. If you install Clang in a custom location you need to tell CMake where - to find it. This can be done by adding the installation path to - the \c CMAKE_PREFIX_PATH CMake cache variable. + to find it. This can be done by specifying your LLVM installation path + using the \c LLVM_INSTALL_DIR environment variable when configuring Qt. + Alternatively, you can add the installation path to the \c CMAKE_PREFIX_PATH + CMake cache variable. */ |