Optionalize the PNG and the Qt dependencies

Expose the ability to turn these dependencies off, which results in reduced
functionality. However, it enables a developer using the zint library to
instruct cmake to build a libzint as deployed by e.g. build servers which
don't have png/zint installed, without having to uninstall those libraries
from the development system
This commit is contained in:
Schaich 2021-03-29 23:35:57 +09:00
parent fd656358a3
commit 9ff3f13c19
3 changed files with 11 additions and 5 deletions

View file

@ -81,7 +81,7 @@ zint_add_test(medical test_medical)
zint_add_test(pcx test_pcx)
zint_add_test(pdf417 test_pdf417)
zint_add_test(plessey test_plessey)
if(PNG_FOUND)
if(ZINT_USE_PNG AND PNG_FOUND)
zint_add_test(png test_png)
endif()
zint_add_test(postal test_postal)