2021-06-10 22:15:39 +12:00
|
|
|
# Copyright (C) 2009-2021 Robin Stuart <rstuart114@gmail.com>
|
2019-09-02 08:09:47 +12:00
|
|
|
# Adapted from qrencode/tests/CMakeLists.txt
|
|
|
|
# Copyright (C) 2006-2017 Kentaro Fukuchi <kentaro@fukuchi.org>
|
2020-06-15 01:42:40 +12:00
|
|
|
# vim: set ts=4 sw=4 et :
|
2019-09-02 08:09:47 +12:00
|
|
|
|
2021-07-08 23:08:59 +12:00
|
|
|
cmake_minimum_required(VERSION 3.9)
|
2020-10-04 10:51:08 +13:00
|
|
|
project(zint_backend_tests)
|
2019-09-02 08:09:47 +12:00
|
|
|
|
|
|
|
enable_testing()
|
|
|
|
|
2021-03-30 03:46:13 +13:00
|
|
|
include(${zint-package_SOURCE_DIR}/cmake/zint_add_test.cmake)
|
|
|
|
|
2020-07-11 06:39:32 +12:00
|
|
|
set(BWIPP_TAR ${CMAKE_CURRENT_SOURCE_DIR}/tools/bwipp_dump.ps.tar.xz)
|
2021-07-08 23:08:59 +12:00
|
|
|
set(BWIPP_PS ${CMAKE_CURRENT_BINARY_DIR}/tools/bwipp_dump.ps)
|
2020-07-11 06:39:32 +12:00
|
|
|
|
|
|
|
if(NOT EXISTS ${BWIPP_PS})
|
2021-07-08 23:08:59 +12:00
|
|
|
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tools)
|
|
|
|
execute_process(COMMAND ${CMAKE_COMMAND} -E tar -xf ${BWIPP_TAR}
|
|
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tools)
|
2020-07-11 06:39:32 +12:00
|
|
|
endif()
|
|
|
|
|
2021-03-23 01:58:34 +13:00
|
|
|
set(testcommon_SRCS testcommon.c testcommon.h)
|
|
|
|
|
|
|
|
add_library(testcommon ${testcommon_SRCS})
|
|
|
|
target_link_libraries(testcommon zint)
|
2021-03-30 03:30:30 +13:00
|
|
|
target_include_directories(testcommon PUBLIC ${zint_backend_tests_SOURCE_DIR})
|
2021-03-30 23:00:24 +13:00
|
|
|
if(NOT HAVE_GETOPT)
|
|
|
|
target_link_libraries(testcommon zint_bundled_getopt)
|
|
|
|
endif()
|
2021-03-23 01:58:34 +13:00
|
|
|
|
2021-03-23 00:23:31 +13:00
|
|
|
if(ZINT_STATIC)
|
2021-03-23 01:58:34 +13:00
|
|
|
add_library(testcommon-static ${testcommon_SRCS})
|
|
|
|
target_link_libraries(testcommon-static zint-static)
|
2021-03-30 03:30:30 +13:00
|
|
|
target_include_directories(testcommon-static PUBLIC ${zint_backend_tests_SOURCE_DIR})
|
2021-03-30 23:00:24 +13:00
|
|
|
if(NOT HAVE_GETOPT)
|
|
|
|
target_link_libraries(testcommon-static zint_bundled_getopt)
|
|
|
|
endif()
|
2021-03-23 00:23:31 +13:00
|
|
|
endif()
|
2019-09-02 08:09:47 +12:00
|
|
|
|
2021-03-23 01:54:57 +13:00
|
|
|
zint_add_test(2of5 test_2of5)
|
|
|
|
zint_add_test(auspost test_auspost)
|
|
|
|
zint_add_test(aztec test_aztec)
|
|
|
|
zint_add_test(big5 test_big5)
|
|
|
|
zint_add_test(bmp test_bmp)
|
|
|
|
zint_add_test(channel test_channel)
|
|
|
|
zint_add_test(codablock test_codablock)
|
|
|
|
zint_add_test(code test_code)
|
|
|
|
zint_add_test(code1 test_code1)
|
|
|
|
zint_add_test(code128 test_code128)
|
|
|
|
zint_add_test(code16k test_code16k)
|
|
|
|
zint_add_test(code49 test_code49)
|
|
|
|
zint_add_test(common test_common)
|
|
|
|
zint_add_test(composite test_composite)
|
|
|
|
zint_add_test(dmatrix test_dmatrix)
|
|
|
|
zint_add_test(dotcode test_dotcode)
|
|
|
|
zint_add_test(eci test_eci)
|
|
|
|
zint_add_test(emf test_emf)
|
|
|
|
zint_add_test(gb18030 test_gb18030)
|
|
|
|
zint_add_test(gb2312 test_gb2312)
|
|
|
|
zint_add_test(gif test_gif)
|
|
|
|
zint_add_test(gridmtx test_gridmtx)
|
|
|
|
zint_add_test(gs1 test_gs1)
|
|
|
|
zint_add_test(hanxin test_hanxin)
|
|
|
|
zint_add_test(imail test_imail)
|
|
|
|
zint_add_test(iso3166 test_iso3166)
|
|
|
|
zint_add_test(iso4217 test_iso4217)
|
|
|
|
zint_add_test(ksx1001 test_ksx1001)
|
|
|
|
zint_add_test(large test_large)
|
|
|
|
zint_add_test(library test_library)
|
|
|
|
zint_add_test(mailmark test_mailmark)
|
|
|
|
zint_add_test(maxicode test_maxicode)
|
|
|
|
zint_add_test(medical test_medical)
|
|
|
|
zint_add_test(pcx test_pcx)
|
|
|
|
zint_add_test(pdf417 test_pdf417)
|
|
|
|
zint_add_test(plessey test_plessey)
|
2021-03-30 03:35:57 +13:00
|
|
|
if(ZINT_USE_PNG AND PNG_FOUND)
|
2021-03-23 01:54:57 +13:00
|
|
|
zint_add_test(png test_png)
|
2021-03-09 01:34:34 +13:00
|
|
|
endif()
|
2021-03-23 01:54:57 +13:00
|
|
|
zint_add_test(postal test_postal)
|
|
|
|
zint_add_test(print test_print)
|
|
|
|
zint_add_test(ps test_ps)
|
|
|
|
zint_add_test(qr test_qr)
|
|
|
|
zint_add_test(raster test_raster)
|
|
|
|
zint_add_test(reedsol test_reedsol)
|
|
|
|
zint_add_test(rss test_rss)
|
|
|
|
zint_add_test(sjis test_sjis)
|
|
|
|
zint_add_test(svg test_svg)
|
|
|
|
zint_add_test(telepen test_telepen)
|
|
|
|
zint_add_test(tif test_tif)
|
|
|
|
zint_add_test(ultra test_ultra)
|
|
|
|
zint_add_test(upcean test_upcean)
|
|
|
|
zint_add_test(vector test_vector)
|