mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
2nd attempt to fix [857021] - add ZINT_NO_PNG define to tests
This commit is contained in:
parent
b3a8680a90
commit
9c701f1009
@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2021-23 Robin Stuart <rstuart114@gmail.com>
|
||||
# Copyright (C) 2021-2024 Robin Stuart <rstuart114@gmail.com>
|
||||
# Adapted from qrencode/tests/CMakeLists.txt
|
||||
# Copyright (C) 2006-2017 Kentaro Fukuchi <kentaro@fukuchi.org>
|
||||
# vim: set ts=4 sw=4 et :
|
||||
@ -8,6 +8,9 @@ macro(zint_add_test test_name test_command)
|
||||
if(ZINT_SHARED)
|
||||
add_executable(${test_command} ${test_command}.c)
|
||||
target_link_libraries(${test_command} testcommon ${ADDITIONAL_LIBS})
|
||||
if(NOT (ZINT_USE_PNG AND PNG_FOUND))
|
||||
target_compile_definitions(${test_command} PRIVATE ZINT_NO_PNG)
|
||||
endif()
|
||||
add_test(${test_name} ${test_command})
|
||||
if(MSVC)
|
||||
set_tests_properties(${test_name} PROPERTIES ENVIRONMENT
|
||||
@ -20,6 +23,9 @@ macro(zint_add_test test_name test_command)
|
||||
if(ZINT_STATIC)
|
||||
add_executable(${test_command}-static ${test_command}.c)
|
||||
target_link_libraries(${test_command}-static testcommon-static ${ADDITIONAL_LIBS})
|
||||
if(NOT (ZINT_USE_PNG AND PNG_FOUND))
|
||||
target_compile_definitions(${test_command}-static PRIVATE ZINT_NO_PNG)
|
||||
endif()
|
||||
add_test(${test_name}-static ${test_command}-static)
|
||||
if(MSVC)
|
||||
set_tests_properties(${test_name}-static PROPERTIES ENVIRONMENT
|
||||
|
Loading…
Reference in New Issue
Block a user