Linking the tests against zint-static if available

Linking against the dynamic zint library requires LD_LIBRARY_PATH and friends
to be set, which complicates the test setup. On the long run, we want to be
able to test both the dynamic and the static (at the same time), though
This commit is contained in:
Schaich 2021-03-22 20:23:31 +09:00
parent acd12e1754
commit c84915e212

View File

@ -17,7 +17,11 @@ if(NOT EXISTS ${BWIPP_PS})
endif()
add_library(testcommon testcommon.c testcommon.h)
target_link_libraries(testcommon zint)
if(ZINT_STATIC)
target_link_libraries(testcommon zint-static)
else()
target_link_libraries(testcommon zint)
endif()
macro(zint_add_test test_name test_command)
set(ADDITIONAL_LIBS "${ARGN}" ${LIBRARY_FLAGS})