Building QT6.4 for Windows with Vulkan support

Installed Vulkan SDK and built QT6.4.2 for windows with the following script:

set PATH=C:\WINDOWS\system32;C:\WINDOWS

"C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\Build\vcvarsall.bat" amd64

set MY_DRIVE=D:

%MY_DRIVE%
mkdir \dev\build\qt
cd \dev\build\qt
       
set "CMAKE_ROOT=%MY_DRIVE%\dev\tools\cmake-3.24.2-windows-x86_64\bin"
set "NINJA_ROOT=%MY_DRIVE%\dev\tools\ninja-win"
set "PERL_ROOT=%MY_DRIVE%\dev\tools\Strawberry\perl\bin"
set "PYTHON_ROOT=%MY_DRIVE%\dev\tools\Python35"
set VULKAN_SDK=%MY_DRIVE%/dev/tools/VulkanSDK/1.3.239.0
set PATH=%CMAKE_ROOT%;%PATH%
set PATH=%NINJA_ROOT%;%PATH%
set PATH=%PERL_ROOT%;%PATH%
set PATH=%PYTHON_ROOT%;%PATH%
       
rem Check if the tools are in PATH
where perl.exe
where python.exe
where cmake.exe
where ninja.exe
       
set MY_INSTALL_PATH=%MY_DRIVE%/dev/libs/Qt6.4/windows
set MY_QT_SRC_DIR=%MY_DRIVE%\dev\repos\qt-everywhere-src-6.4.3
set MY_OPENSSL_DIR=%MY_DRIVE%/dev/libs/OpenSSL
set CL=/MP
 
%MY_QT_SRC_DIR%\configure.bat -prefix %MY_INSTALL_PATH% -DQT_NO_EXCEPTIONS=1 ^
  -debug-and-release -force-debug-info -platform win32-msvc -opensource -confirm-license ^
  -c++std c++20 -static -static-runtime -openssl-linked ^
  -skip qt3d -skip qt5compat -skip qtactiveqt -skip qtcharts -skip qtcoap -skip qtconnectivity ^
  -skip qtdatavis3d -skip qtdoc -skip qtlottie -skip qtmqtt -skip qtnetworkauth -skip qtopcua ^
  -skip qtserialport -skip qtpositioning -skip qtquicktimeline -skip qtquick3d -skip qtremoteobjects ^
  -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtvirtualkeyboard -skip qtwayland ^
  -skip qtwebchannel -skip qtwebengine -skip qtwebview -skip qtquick3dphysics -skip qtspeech -skip qthttpserver ^
  -I %VULKAN_SDK%/Include -L %VULKAN_SDK%/Lib -feature-vulkan ^
  -- -D OPENSSL_ROOT_DIR=%MY_OPENSSL_DIR% -D OPENSSL_USE_STATIC_LIBS=ON ^
&& cmake --build . --parallel && ninja install

It displayed the following Configure summary:

Building for: win32-msvc (x86_64, CPU features: sse sse2)
Compiler: msvc 19.35.32216.1
Build options:
  Mode ................................... debug and release (with debug info)
  Optimize release build for size ........ no
  Fully optimize release builds (-O3) .... no
  Building shared libraries .............. no
  Using C standard ....................... C11
  Using C++ standard ..................... C++20
  Relocatable ............................ no
  Using precompiled headers .............. yes
  Using LTCG ............................. no
  Using Intel CET ........................ no
  Target compiler supports:
    SSE .................................. SSE2 SSE3 SSSE3 SSE4.1 SSE4.2
    AVX .................................. AVX AVX2 VAES
    AVX512 ............................... F ER CD PF DQ BW VL IFMA VBMI AVX512VBMI2
    Other x86 ............................ AES F16C RDRAND SHA
  Sanitizers:
    Addresses ............................ no
    Threads .............................. no
    Memory ............................... no
    Fuzzer (instrumentation only) ........ no
    Undefined ............................ no
  Build parts ............................ libs tools
  App store compliance ................... no
Qt modules and options:
  Qt Concurrent .......................... yes
  Qt D-Bus ............................... yes
  Qt D-Bus directly linked to libdbus .... no
  Qt Gui ................................. yes
  Qt Network ............................. yes
  Qt PrintSupport ........................ yes
  Qt Sql ................................. yes
  Qt Testlib ............................. yes
  Qt Widgets ............................. yes
  Qt Xml ................................. yes
Support enabled for:
  Using pkg-config ....................... no
  udev ................................... no
  Using system zlib ...................... no
  Zstandard support ...................... no
  Thread support ......................... yes
Common build options:
  Linker can resolve circular dependencies  yes
Qt Core:
  backtrace .............................. no
  DoubleConversion ....................... yes
    Using system DoubleConversion ........ no
  GLib ................................... no
  ICU .................................... no
  Using system libb2 ..................... no
  Built-in copy of the MIME database ..... yes
  cpp/winrt base ......................... no
  Tracing backend ........................ <none>
  Logging backends:
    journald ............................. no
    syslog ............................... no
    slog2 ................................ no
  PCRE2 .................................. yes
    Using system PCRE2 ................... no
Qt Sql:
  SQL item models ........................ yes
Qt Network:
  getifaddrs() ........................... no
  IPv6 ifname ............................ no
  libproxy ............................... no
  Schannel ............................... yes
  OpenSSL ................................ yes
    Qt directly linked to OpenSSL ........ yes
  OpenSSL 1.1 ............................ yes
  DTLS ................................... yes
  OCSP-stapling .......................... yes
  SCTP ................................... no
  Use system proxies ..................... yes
  GSSAPI ................................. no
  Brotli Decompression Support ........... no
  qTopLevelDomain() ...................... yes
    Built-in publicsuffix database ....... yes
    System publicsuffix database ......... no
Core tools:
  Android deployment tool ................ yes
  macOS deployment tool .................. no
  Windows deployment tool ................ yes
  qmake .................................. yes
Qt Gui:
  Accessibility .......................... yes
  FreeType ............................... yes
    Using system FreeType ................ no
  HarfBuzz ............................... yes
    Using system HarfBuzz ................ no
  Fontconfig ............................. no
  Image formats:
    GIF .................................. yes
    ICO .................................. yes
    JPEG ................................. yes
      Using system libjpeg ............... no
    PNG .................................. yes
      Using system libpng ................ no
  Text formats:
    HtmlParser ........................... yes
    CssParser ............................ yes
    OdfWriter ............................ yes
    MarkdownReader ....................... yes
      Using system libmd4c ............... no
    MarkdownWriter ....................... yes
  EGL .................................... no
  OpenVG ................................. no
  OpenGL:
    Desktop OpenGL ....................... no
    Dynamic OpenGL ....................... yes
    OpenGL ES 2.0 ........................ no
    OpenGL ES 3.0 ........................ no
    OpenGL ES 3.1 ........................ no
    OpenGL ES 3.2 ........................ no
  Vulkan ................................. yes
  Session Management ..................... yes
Features used by QPA backends:
  evdev .................................. no
  libinput ............................... no
  HiRes wheel support in libinput ........ no
  INTEGRITY HID .......................... no
  mtdev .................................. no
  tslib .................................. no
  xkbcommon .............................. no
  X11 specific:
    XLib ................................. no
    XCB Xlib ............................. no
    EGL on X11 ........................... no
    xkbcommon-x11 ........................ no
    xcb-sm ............................... no
QPA backends:
  DirectFB ............................... no
  EGLFS .................................. no
  EGLFS details:
    EGLFS OpenWFD ........................ no
    EGLFS i.Mx6 .......................... no
    EGLFS i.Mx6 Wayland .................. no
    EGLFS RCAR ........................... no
    EGLFS EGLDevice ...................... no
    EGLFS GBM ............................ no
    EGLFS VSP2 ........................... no
    EGLFS Mali ........................... no
    EGLFS Raspberry Pi ................... no
    EGLFS X11 ............................ no
  LinuxFB ................................ no
  VNC .................................... no
  VK_KHR_display ......................... no
  QNX:
    lgmon ................................ no
    IMF .................................. no
  XCB:
    Using system-provided xcb-xinput ..... no
    GL integrations:
      GLX Plugin ......................... no
        XCB GLX .......................... no
      EGL-X11 Plugin ..................... no
  Windows:
    Direct 2D ............................ yes
    Direct 2D 1.1 ........................ yes
    DirectWrite .......................... yes
    DirectWrite 3 ........................ yes
Qt Widgets:
  GTK+ ................................... no
  Styles ................................. Fusion Windows WindowsVista
Qt Testlib:
  Tester for item models ................. yes
Qt PrintSupport:
  CUPS ................................... no
Qt Sql Drivers:
  DB2 (IBM) .............................. no
  InterBase .............................. no
  MySql .................................. no
  OCI (Oracle) ........................... no
  ODBC ................................... yes
  PostgreSQL ............................. no
  SQLite ................................. yes
    Using system provided SQLite ......... no
Further Image Formats:
  JasPer ................................. no
  MNG .................................... no
  TIFF ................................... yes
    Using system libtiff ................. no
  WEBP ................................... yes
    Using system libwebp ................. no
Qt QML:
  QML network support .................... yes
  QML debugging and profiling support .... yes
  QML just-in-time compiler .............. yes
  QML XML http request ................... yes
  QML Locale ............................. yes
Qt QML Models:
  QML list model ......................... yes
  QML delegate model ..................... yes
Qt Quick:
  AnimatedImage item ..................... yes
  Canvas item ............................ yes
  Support for Qt Quick Designer .......... yes
  Flipable item .......................... yes
  GridView item .......................... yes
  ListView item .......................... yes
  TableView item ......................... yes
  TreeView item .......................... yes
  Path support ........................... yes
  PathView item .......................... yes
  Positioner items ....................... yes
  Repeater item .......................... yes
  ShaderEffect item ...................... yes
  Sprite item ............................ yes
Qt Quick Templates 2:
  Hover support ..............
............ yes
  Multi-touch support .................... yes
  Calendar support ....................... yes
Qt Quick Controls 2:
  Styles ................................. Basic Fusion Imagine iOS Material Universal macOS Windows
Qt Multimedia:
  Spatial Audio .......................... yes
  Spatial Audio (Quick3D) ................ no
  Low level Audio Backend:
    ALSA (experimental) .................. no
    PulseAudio ........................... no
    MMRenderer ........................... no
    CoreAudio ............................ no
    Windows Media SDK .................... yes
    Open SLES (Android) .................. no
    Web Assembly ......................... no
  Plugin:
    GStreamer 1.0 ........................ no
    FFmpeg ............................... no
    MMRenderer ........................... no
    AVFoundation ......................... no
    Windows Media Foundation ............. yes
  Hardware acceleration and features:
    Video for Linux ...................... no
    VAAPNote: Using static linking will disable the use of dynamically loaded plugins. Make sure to import all needed static plugins, or compile needed modules into the library.

WARNING: Basic cpp/winrt support missing. Some features might not be available.
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 support ........................ no
    Linux DMA buffer support ............. no
    VideoToolbox ......................... no
Qt Tools:
  Qt Assistant ........................... yes
  QDoc ................................... no
  Clang-based lupdate parser ............. no
  Qt Designer ............................ yes
  Qt Distance Field Generator ............ yes
  Qt Linguist ............................ yes
  pixeltool .............................. yes
  qdbus .................................. yes
  Qt Attributions Scanner ................ yes
  qtdiag ................................. yes
  qtplugininfo ........................... yes

--

Qt is now configured for building. Just run 'cmake --build . --parallel'

Once everything is built, you must run 'ninja install'
Qt will be installed into 'D:/dev/libs/Qt6.4/windows'

To configure and build other Qt modules, you can use the following convenience script:
        D:/dev/libs/Qt6.4/windows/bin/qt-configure-module.bat

If reconfiguration fails for
 some reason, try removing 'CMakeCache.txt' from the build directory

-- Configuring done
-- Generating done
-- Build files have been written to: D:/dev/build/qt

and built successfully.

2 Responses to Building QT6.4 for Windows with Vulkan support

  1. dmitriano says:

    https://forum.qt.io/topic/135894/build-qt6-with-qt-3d-apis-vulkan-enabled
    ./configure -prefix /usr/local/Qt6 \
    -c++std c++20 \
    -skip qtwebengine \
    -inotify \
    -sctp \
    -eventfd \
    -feature-vulkan \
    -make tools \
    -make examples \
    -I $VULKAN_HEADERS_INSTALL_DIR/include/ \
    -L $VULKAN_LOADER_INSTALL_DIR/lib

  2. dmitriano says:

    Building AWL with QT for x86:
    cmake.exe C:\dev\repos\Awl -G %MY_VS_GENERATOR% -DCMAKE_PREFIX_PATH=C:/dev/libs/QT5-msvc -A win32
    StdStream.h(28,57): warning C4244: ‘initializing’: conversion from ‘std::streamsize’ to ‘size_t’, possible loss of data (compiling source file C:\dev\repos\Awl\Tests\HashStreamTest.cpp)

Leave a Reply

Your email address will not be published. Required fields are marked *