windowscmakeqt6libclangqdoc

Cannot configure QDoc when configuring Qt 6.2.4 because of missing libclang


I am trying to build Qt 6.2.4 from source on Windows 10. I run into the following WARNINGs when configuring.

WARNING: 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.
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.
You will also need to set the FEATURE_clang CMake variable to ON to re-evaluate this check.
WARNING: Clang-based lupdate parser will not be available. LLVM and Clang C++ libraries have not been found.
You will need to set the FEATURE_clangcpp CMake variable to ON to re-evaluate this check.

I have set the LLVM_INSTALL_DIR to the top-level directory of the pre-built libclang on Qt's download site (https://download.qt.io/development_releases/prebuilt/libclang/). In particular, I downloaded the 16.0.2 for windows. I deleted my build directory and configured again. Despite my doing this, it still gives me the WARNINGs. Does someone know what is going on and can give me advice?


Solution

  • It looks like I was not actually setting the LLVM_INSTALL_DIR. I tried to use -D when invoking the configure.bat, instead of using -D with a call to cmake. Calling cmake with the -DLLVM_INSTALL_DIR=/path/to/llvm seemed to actually set the LLVM_INSTALL_DIR.