Closed Gigas002 closed 1 year ago
there is one more CMakeLists.txt with find_package Qt under plugins/player_mpv, do you forget to modify it at the same time? or maybe you can try to explicitly specify -DQT_MAJOR_VERSION=6
.
@zymelaii nah, setting QT_MAJOR_VERSION
through cli arguments is ignored by cmake.
I also tried a message("Qt Version: " ${QT_VERSION})
in a plugins/player_mpv and it sees the qt6, judging by output, so I don't think it's failing out there.
then how about QT_DEFAULT_MAJOR_VERSION? https://doc.qt.io/qt-6/cmake-variable-reference.html#qt-default-major-version
Nope, it still ignores the option, either I'm doing something wrong:
$ cmake .. -DKDE_SUPPORT=ON -DCMAKE_BUILD_TYPE=Release -DQT_DEFAULT_MAJOR_VERSION=6
-- The CXX compiler identification is GNU 13.1.1
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Build configuration: Release
-- Qt Version: 5.15.9
-- Found PkgConfig: /usr/bin/pkg-config (found version "1.8.1")
-- Checking for module 'exiv2'
-- Found exiv2, version 0.27.6
-- Found X11: /usr/include
-- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so
-- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found OpenCV: /usr (found version "4.7.0") found components: core imgproc
-- Checking for module 'mpv'
-- Found mpv, version 2.1.0
-- Configuring done (0.8s)
-- Generating done (0.0s)
CMake Warning:
Manually-specified variables were not used by the project:
QT_DEFAULT_MAJOR_VERSION
-- Build files have been written to: /home/gigas/downloads/qimgv/build
uhh, i tried it on my arch and both versions of qt completed the build.
here is my devenv
the key difference may lie on the option "KDE_SUPPORT"
qimgv specifies kf5windowsystem and this is from the repo KDE/kwindowsystem, which is now updating to kf6windowsystem.
i guess that kf5windowsystem is built with qt5 while the kf6 is built with qt6. with cmake interface property written to the library target, the kf... lib can only accept the qt with the desired version.
so simply disable KDE_SUPPORT or replace kf5windowsystem with kf6windowsystem to fit qt6 may help.
So that's where the error came from! That's reasonable.
Thanks for noticing this, it builds without issues, when excluding KDE_SUPPORT
option
I have both
qt5
andqt6
installed on my linux, but since qimgv forces build on qt5 no matter I have qt6, I wanted to introduce the cmake option for this. I tried introducing theFORCE_QT6
option for CMakeLists.txt like so:But trying to make it with:
Results in error: