Linux CMake will not use version in /opt
-
wrote on 28 May 2024, 14:20 last edited by Musmuris
Hi,
Developing on Linux (actually WSL Ubuntu 22.04). I have the Ubuntu QT (6.2) packages installed (to /usr/lib) but I also used the installer to get v6.7.0 at /opt/Qt.I cannot seem to persuade CMake to use the version at /opt!
My command line is this
cmake -DCMAKE_PREFIX_PATH=/opt/Qt/6.7.0/gcc_x64/lib/cmake/Qt6 -DQt6_DIR:PATH=/opt/Qt/6.7.0/gcc_x64/lib/cmake/Qt6 -S . -b linux_build
but the cache and build still use /usr/lib version. Any hints?
-
wrote on 28 May 2024, 14:33 last edited by Musmuris
Ok - I have no idea where I got that "x" in
gcc_x64
- it's justgcc_64
And the correct incantation seems to be
cmake -DCMAKE_PREFIX_PATH:PATH=/opt/Qt/6.7.0/gcc_64 -S . -B linux_debug
UPDATE:
Additionally I neededsudo apt install libglx-dev libg1-mesa-dev
Otherwise it mysteriously failed finding QtGui
-
-
wrote on 28 May 2024, 15:13 last edited by
It was in typing the original question that I thought "what does QtCreator do"? - and got the command line from there
1/3