mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
better windows support
This commit is contained in:
parent
f8166fa331
commit
8ff0df1491
@ -5,7 +5,7 @@ project(zint)
|
|||||||
find_package(PNG)
|
find_package(PNG)
|
||||||
find_package(Qr)
|
find_package(Qr)
|
||||||
|
|
||||||
set(zint_COMMON_SRCS common.c png.c library.c ps.c large.c reedsol.c)
|
set(zint_COMMON_SRCS common.c library.c ps.c large.c reedsol.c)
|
||||||
set(zint_ONEDIM_SRCS code.c code128.c 2of5.c upcean.c telepen.c medical.c plessey.c rss.c)
|
set(zint_ONEDIM_SRCS code.c code128.c 2of5.c upcean.c telepen.c medical.c plessey.c rss.c)
|
||||||
set(zint_POSTAL_SRCS postal.c auspost.c imail.c)
|
set(zint_POSTAL_SRCS postal.c auspost.c imail.c)
|
||||||
set(zint_TWODIM_SRCS code16k.c blockf.c dmatrix.c dm200.c pdf417.c qr.c maxicode.c composite.c aztec.c)
|
set(zint_TWODIM_SRCS code16k.c blockf.c dmatrix.c dm200.c pdf417.c qr.c maxicode.c composite.c aztec.c)
|
||||||
@ -13,6 +13,7 @@ set(zint_SRCS ${zint_COMMON_SRCS} ${zint_ONEDIM_SRCS} ${zint_POSTAL_SRCS} ${zint
|
|||||||
|
|
||||||
if(PNG_FOUND)
|
if(PNG_FOUND)
|
||||||
include_directories( ${PNG_INCLUDES} )
|
include_directories( ${PNG_INCLUDES} )
|
||||||
|
set(zint_SRCS ${zint_SRCS} png.c)
|
||||||
else(PNG_FOUND)
|
else(PNG_FOUND)
|
||||||
add_definitions (-DNO_PNG)
|
add_definitions (-DNO_PNG)
|
||||||
endif(PNG_FOUND)
|
endif(PNG_FOUND)
|
||||||
|
@ -109,7 +109,10 @@ extern int codablock(struct zint_symbol *symbol, unsigned char source[]); /* Cod
|
|||||||
extern int daft_code(struct zint_symbol *symbol, unsigned char source[]); /* DAFT Code */
|
extern int daft_code(struct zint_symbol *symbol, unsigned char source[]); /* DAFT Code */
|
||||||
extern int ean_14(struct zint_symbol *symbol, unsigned char source[]); /* EAN-14 */
|
extern int ean_14(struct zint_symbol *symbol, unsigned char source[]); /* EAN-14 */
|
||||||
|
|
||||||
|
#ifndef NO_PNG
|
||||||
extern int png_plot(struct zint_symbol *symbol);
|
extern int png_plot(struct zint_symbol *symbol);
|
||||||
|
#endif
|
||||||
|
|
||||||
extern int ps_plot(struct zint_symbol *symbol);
|
extern int ps_plot(struct zint_symbol *symbol);
|
||||||
|
|
||||||
int ZBarcode_Encode(struct zint_symbol *symbol, unsigned char *input)
|
int ZBarcode_Encode(struct zint_symbol *symbol, unsigned char *input)
|
||||||
|
@ -55,7 +55,6 @@ static void writepng_error_handler(png_structp png_ptr, png_const_charp msg)
|
|||||||
|
|
||||||
int png_to_file(struct zint_symbol *symbol, int image_height, int image_width, char *pixelbuf, int rotate_angle)
|
int png_to_file(struct zint_symbol *symbol, int image_height, int image_width, char *pixelbuf, int rotate_angle)
|
||||||
{
|
{
|
||||||
#ifndef NO_PNG
|
|
||||||
struct mainprog_info_type wpng_info;
|
struct mainprog_info_type wpng_info;
|
||||||
struct mainprog_info_type *graphic;
|
struct mainprog_info_type *graphic;
|
||||||
unsigned char outdata[image_width * 3];
|
unsigned char outdata[image_width * 3];
|
||||||
@ -270,7 +269,6 @@ int png_to_file(struct zint_symbol *symbol, int image_height, int image_width, c
|
|||||||
/* make sure we have disengaged */
|
/* make sure we have disengaged */
|
||||||
if (png_ptr && info_ptr) png_destroy_write_struct(&png_ptr, &info_ptr);
|
if (png_ptr && info_ptr) png_destroy_write_struct(&png_ptr, &info_ptr);
|
||||||
fclose(wpng_info.outfile);
|
fclose(wpng_info.outfile);
|
||||||
#endif
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
project(QZint)
|
project(QZint)
|
||||||
|
|
||||||
include_directories(BEFORE ../backend )
|
include_directories(BEFORE "${CMAKE_SOURCE_DIR}/backend" )
|
||||||
|
|
||||||
set(QZint_SRCS qzint.cpp)
|
set(QZint_SRCS qzint.cpp)
|
||||||
|
|
||||||
@ -19,7 +19,7 @@ set_target_properties(QZint PROPERTIES VERSION ${ZINT_VERSION}
|
|||||||
|
|
||||||
add_dependencies(QZint zint)
|
add_dependencies(QZint zint)
|
||||||
|
|
||||||
link_directories( "../backend" )
|
link_directories( "${CMAKE_BINARY_DIR}/backend" )
|
||||||
|
|
||||||
target_link_libraries(QZint zint ${QT_QTGUI_LIBRARY}
|
target_link_libraries(QZint zint ${QT_QTGUI_LIBRARY}
|
||||||
${QT_QTCORE_LIBRARY} )
|
${QT_QTCORE_LIBRARY} )
|
||||||
|
Loading…
Reference in New Issue
Block a user