ftylitak / qzxing

Qt/QML wrapper library for the ZXing library. 1D/2D barcode image processing library
Apache License 2.0
621 stars 340 forks source link

Fix build with cmake (qt6) #213

Closed EndrII closed 2 years ago

EndrII commented 2 years ago

Add support qt6 library for CMake build system.

Search order of qt libraries

If you have two qt version on one machine you can force sets QT_VERSION_MAJOR for build

EndrII commented 2 years ago

still not working with QZXING_MULTIMEDIA

dabbinavo commented 2 years ago

Hey @EndrII, just created a pull request (#214) for the same thing and now saw that you already opened one 2 days ago.

In principle they are very similar. I like your idea of letting the user manually define QT_VERSION_MAJOR instead of letting the find_package function determine it. Also that the multimedia package only is searched if needed at all.

I think whats missing in your implementation is the check for Qt 6.2+ that has to include QZXingFilterVideoSink.cpp/h instead of QZXingFilter.cpp/h. Qt6 versions before 6.2 do not support multimedia at all. Cmake normally should fail than on the find_package command.

So what should we do? Do you want to update your pull request to work with Qt6.2 or should I update mine with your improvements?

EndrII commented 2 years ago

@dabbinavo i close this pull request. but i fuoun some issues in youe PR. please fix