mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
Test both the dynamic and the static library
This commit is contained in:
parent
e5cd0e4ee8
commit
eabaf54d74
@ -21,11 +21,14 @@ if(NOT EXISTS ${BWIPP_PS})
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/tools)
|
||||
endif()
|
||||
|
||||
add_library(testcommon testcommon.c testcommon.h)
|
||||
set(testcommon_SRCS testcommon.c testcommon.h)
|
||||
|
||||
add_library(testcommon ${testcommon_SRCS})
|
||||
target_link_libraries(testcommon zint)
|
||||
|
||||
if(ZINT_STATIC)
|
||||
target_link_libraries(testcommon zint-static)
|
||||
else()
|
||||
target_link_libraries(testcommon zint)
|
||||
add_library(testcommon-static ${testcommon_SRCS})
|
||||
target_link_libraries(testcommon-static zint-static)
|
||||
endif()
|
||||
|
||||
macro(zint_add_test test_name test_command)
|
||||
@ -33,6 +36,11 @@ macro(zint_add_test test_name test_command)
|
||||
add_executable(${test_command} ${test_command}.c)
|
||||
target_link_libraries(${test_command} testcommon ${ADDITIONAL_LIBS})
|
||||
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})
|
||||
add_test(${test_name}-static ${test_command}-static)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
zint_add_test(2of5 test_2of5)
|
||||
|
Loading…
Reference in New Issue
Block a user