Topic: Linux compile with Qt online versions

Get Qt 5 and install the version you want  in your $HOME Qt directory:


Edit qtchooser/qt5.conf
cat /usr/lib/x86_64-linux-gnu/qtchooser/qt5.conf


cat .bashrc

export PATH=~/kde/src/kdesrc-build:$PATH

Apply change

source ~/.bashrc 

$ qtchooser -print-env
$ qmake --version
QMake version 3.1
Using Qt version 5.13.2 in /home/laurent/Qt/5.13.2/gcc_64/lib … esrc-build … om-qt.html

mkdir -p ~/kde/src
cd ~/kde/src/
git clone  && cd kdesrc-build

Edit ~/.kdesrc-buildrc, and replace the path to Qt qtdir with the path you installed Qt to. The line should then look similar to this:
cat .kdesrc-buildrc

# This is a sample kdesrc-build configuration file appropriate for KDE
# Frameworks 5-based build environments.
# See the kdesrc-buildrc-sample for explanations of what the options do, or
# view the manpage or kdesrc-build documentation at
# … index.html
    branch-group kf5-qt5
    kdedir ~/kde # Where to install KF5-based software
    # Uncomment this and edit value to choose a different Qt5
    qtdir ~/Qt/5.13.2/gcc_64   # Where to find Qt5

    # Where to download source code. By default the build directory and
    # logs will be kept under this directory as well.
    source-dir ~/kde
end global

# Instead of specifying modules here, the current best practice is to refer to
# KF5 module lists maintained with kdesrc-build by the KF5 developers. As new
# modules are added or modified, the kdesrc-build KF5 module list is altered to
# suit, and when you update kdesrc-build you will automatically pick up the
# needed changes.

# NOTE: You MUST change the path below to include the actual path to your
# kdesrc-build installation.
include ~/kde/src/kdesrc-build/kf5-qt5-build-include

# If you wish to maintain the module list yourself that is possible, simply
# look at the files pointed to above and use the "module-set" declarations that
# they use, with your own changes.

# It is possible to change the options for modules loaded from the file
# included above (since it's not possible to add a module that's already been
# included), e.g.
options kcoreaddons
    make-options -j16
end options

Compiling KDE frameworks :

kdesrc-build kwidgetsaddons karchive kcoreaddons --include-dependencies
cp ~/kde/mkspecs/*.pri ~/Qt/5.13.2/gcc_64/mkspecs/modules/

Get QET source files and compile it:

git clone git:// qet_git
cd qet_git
mkdir build/ && cd build
qmake ../
make -j$(nproc)

2 (edited by De-Backer 2020-12-07 21:25:35)

Re: Linux compile with Qt online versions

For suse TW
Compiling KDE frameworks :

mkdir -p ~/kde/src
cd ~/kde/src/
git clone && cd kdesrc-build
./kdesrc-build --initial-setup
./kdesrc-build kwidgetsaddons karchive kcoreaddons --include-dependencies --ignore-modules Qt5

setup Qt5.51.1

cp ~/kde/usr/mkspecs/modules/*.pri ~/Qt/5.15.1/gcc_64/mkspecs/modules/
cp -r ~/kde/usr/include/* ~/Qt/5.15.1/gcc_64/include/
cp -r ~/kde/usr/lib64 ~/Qt/5.15.1/gcc_64/
cp -r ~/kde/usr/bin ~/Qt/5.15.1/gcc_64/

or for Qt6

cp ~/kde/usr/mkspecs/modules/*.pri ~/Qt/6.0.0/gcc_64/mkspecs/modules/
cp -r ~/kde/usr/include/* ~/Qt/6.0.0/gcc_64/include/
cp -r ~/kde/usr/lib64 ~/Qt/6.0.0/gcc_64/
cp -r ~/kde/usr/bin ~/Qt/6.0.0/gcc_64/