Skip to content

Guide to build qt statically in debian

Felipe Fonseca edited this page Mar 11, 2018 · 5 revisions

Install build-depends for any package:

  • sudo apt-get build-dep qt5-default
  • sudo apt-get install libxcb-xinerama0-dev

Getting the source code

  • First clone the top-level Qt 5 git repository:

  • Getting the submodule source code

    • $ cd qt5
    • $ perl init-repository
    • Make new directory somewhere and rename it to qt_static
    • Execute following script in qt5 directory
    #!/bin/bash 
    PREFIX=/path/to/qt_static
    ./configure -prefix $PREFIX -release -opensource -static -confirm-license -nomake tools -nomake examples -
    nomake tests -qt-doubleconversion -no-glib -qt-pcre -qt-zlib -qt-harfbuzz -qt-xkbcommon-x11 -qt-libpng -qt-
    libjpeg -qt-assimp -silent -skip wayland
    
    • go to qt5 directory
    • execute make
    • execute make install
  • Install qt libraries staticaly using script