mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-21 02:35:14 -04:00
- cmake: remove zintconfig.h.in for now as incompatible with MSVC
project builds (will add back in future if go fully CMake) - NO_PNG -> ZINT_NO_PNG and new API function `Zint_NoPng()` to determine if no PNG support in libzint; replace use in GUI with backend_qt method `noPng()`
This commit is contained in:
parent
536a581d9e
commit
6393813cff
31 changed files with 138 additions and 156 deletions
|
@ -25,12 +25,18 @@ if(ZINT_SHARED)
|
|||
add_library(testcommon ${testcommon_SRCS})
|
||||
target_link_libraries(testcommon zint)
|
||||
target_include_directories(testcommon PUBLIC ${zint_backend_tests_SOURCE_DIR})
|
||||
if(NOT (ZINT_USE_PNG AND PNG_FOUND))
|
||||
target_compile_definitions(testcommon PRIVATE ZINT_NO_PNG)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(ZINT_STATIC)
|
||||
add_library(testcommon-static ${testcommon_SRCS})
|
||||
target_link_libraries(testcommon-static zint-static)
|
||||
target_include_directories(testcommon-static PUBLIC ${zint_backend_tests_SOURCE_DIR})
|
||||
if(NOT (ZINT_USE_PNG AND PNG_FOUND))
|
||||
target_compile_definitions(testcommon-static PRIVATE ZINT_NO_PNG)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
zint_add_test(2of5 test_2of5)
|
||||
|
|
|
@ -102,9 +102,9 @@ static void test_print(const testCtx *const p_ctx) {
|
|||
}
|
||||
|
||||
for (j = 0; j < exts_size; j++) {
|
||||
#ifdef NO_PNG
|
||||
if (strcmp(exts[j], "png") == 0) continue;
|
||||
#endif
|
||||
|
||||
if (ZBarcode_NoPng() && strcmp(exts[j], "png") == 0) continue;
|
||||
|
||||
assert_nonzero(sizeof(data_subdir) > strlen(data_dir) + 1 + strlen(exts[j]),
|
||||
"sizeof(data_subdir) (%d) <= strlen(data_dir) (%d) + 1 + strlen(%s) (%d)\n",
|
||||
(int) sizeof(data_subdir), (int) strlen(data_dir), exts[j], (int) strlen(exts[j]));
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
#include <windows.h>
|
||||
#include <direct.h>
|
||||
#endif
|
||||
#ifndef NO_PNG
|
||||
#ifndef ZINT_NO_PNG
|
||||
#include <png.h>
|
||||
#include <zlib.h>
|
||||
#include <setjmp.h>
|
||||
|
@ -1363,7 +1363,7 @@ int testUtilRename(const char *oldpath, const char *newpath) {
|
|||
/* Compare 2 PNG files */
|
||||
int testUtilCmpPngs(const char *png1, const char *png2) {
|
||||
int ret = -1;
|
||||
#ifdef NO_PNG
|
||||
#ifdef ZINT_NO_PNG
|
||||
(void)png1; (void)png2;
|
||||
#else
|
||||
FILE *fp1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue