Do conditional includes of crypto files
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 5b317f3..095270c 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -2,12 +2,16 @@
# compiling/installing sources for COSE-C
#
+if (use_embedtls)
+ set (cose_crypto mbedtls.c)
+else ()
+ set (cose_crypto openssl.c)
+endif()
+
set ( cose_sources
Cose.c
MacMessage.c
MacMessage0.c
- mbedtls.c
- openssl.c
Sign.c
Sign0.c
cbor.c
@@ -15,8 +19,10 @@
Encrypt0.c
Recipient.c
SignerInfo.c
+ ${cose_crypto}
)
+
if (use_context)
add_definitions(-DUSE_CBOR_CONTEXT)
endif()