swex / QZXingNu

simple Qt wrapper library for zxing-cpp rewrite by nu-book
Apache License 2.0
8 stars 2 forks source link

Using find_package(ZXing) for handling the ZXing dependency #6

Open tanius opened 4 years ago

tanius commented 4 years ago

All external dependencies in QZXingNu are managed via CMake's find_package(…) mechanism, with the exception of ZXing-C++, which is included in a sub-directory (see). The ZXing-C++ library is provided in that subdirectory at the time of a Git checkout via the Git submodule mechanism.

Wouldn't it be more uniform and also better to also use find_package(ZXing REQUIRED) for that dependency in CMakeLists.txt? That's possible, as ZXing-C++ provides such a package (I tried it). People could then easily have a source layout with each repository in its own directory, all only connected via CMake's find_package(…) mechanism.

An issue might be that QZXingNu depends on a particular version of ZXing-C++ and they don't seem to expose a version in the package (at least for me find_package(ZXing 1.0.8 REQUIRED) failed, telling that the version of the installed ZXing-C++ package was unknown). But then we could ask them to provide that kind of information in their CMake package.

axxel commented 4 years ago

About the missing version: That is probably a one-liner (says my gut feeling). If you happen to know or find it, please send us a PR :).