set(SOURCES asn1-cer.cc
            asn1-cerstream.cc
            asn1_message.cc)

set(HEADERS asn1-cer.h
            asn1-cerstream.h
            asn1_message.h)

add_library(asn1 OBJECT ${SOURCES})


compile_asn1_lib(SOURCES
    messages/common.asn1
    messages/cryptosource.asn1
    messages/ipuptane_message.asn1
    messages/tlsconfig.asn1
)

add_aktualizr_test(NAME asn1 SOURCES $<TARGET_OBJECTS:asn1> $<TARGET_OBJECTS:asn1_lib> asn1_test.cc)

aktualizr_source_file_checks(${SOURCES} ${HEADERS} asn1_test.cc)

set(SOURCES asn1-cer.cc
            asn1-cerstream.cc
            asn1_message.cc)

set(HEADERS asn1-cer.h
            asn1-cerstream.h
            asn1_message.h)

add_library(asn1 OBJECT ${SOURCES})


compile_asn1_lib(SOURCES
    messages/common.asn1
    messages/cryptosource.asn1
    messages/ipuptane_message.asn1
    messages/tlsconfig.asn1
)

add_aktualizr_test(NAME asn1 SOURCES $<TARGET_OBJECTS:asn1> asn1_test.cc)

aktualizr_source_file_checks(${SOURCES} ${HEADERS} asn1_test.cc)

Remove a double link with asn1_lib
Remove a double link with asn1_lib

The test already links with libaktualizr

Found with clang sanitizer

Signed-off-by: Laurent Bonnans <0909bc0a3d1b0c91d8e00372b9633e8e9ea958de@here.com>
