Get the build process working
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 96fabba..2b4fbea 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -123,7 +123,7 @@
ExternalProject_Add(
project_embedtls
GIT_REPOSITORY https://github.com/ARMmbed/mbedtls
- CMAKE_ARGS -DENABLED_PROGRAMS=OFF -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> -Dcoveralls=OFF -Dbuild_shared_libs=${build_shared_libs} -Dfatal_warnings=OFF -DENABLE_TESTING=OFF
+ CMAKE_ARGS -DENABLED_PROGRAMS=OFF -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> -Dcoveralls=OFF -DUSE_SHARED_MBEDTLS_LIBRARY=${build_shared_libs} -Dfatal_warnings=OFF -DENABLE_TESTING=OFF
INTALL_DIR "${dist_dir}"
UPDATE_DISCONNECTED 1
)
@@ -131,7 +131,7 @@
ExternalProject_Get_Property(project_embedtls install_dir)
include_directories( "${install_dir}/include" )
add_library( embedtls STATIC IMPORTED)
- set_property (TARGET embedtls PROPERTY IMPORTED_LOCATION "${install_dir}/lib/${CMAKE_SHARED_MODULE_PREFIX}embedtls${CMAKE_SHARED_LIBRARY_SUFFIX}")
+ set_property (TARGET embedtls PROPERTY IMPORTED_LOCATION "${install_dir}/lib/${CMAKE_SHARED_MODULE_PREFIX}mbedcrypto${CMAKE_SHARED_LIBRARY_SUFFIX}")
add_dependencies(embedtls project_embedtls)
endif ()
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index aef0143..4311f1b 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -31,6 +31,7 @@
target_link_libraries ( cose-c PRIVATE ${OPENSSL_LIBRARIES} )
target_link_libraries ( cose-c PRIVATE cn-cbor )
if (use_embedtls)
+ target_include_directories ( cose-c PUBLIC ${CMAKE_SHARED_MODLE_PREFIX}embedtls${CMAKE_SHARED_LIBRARY_SUFFIX}/include )
target_link_libraries ( cose-c PRIVATE embedtls )
endif()
diff --git a/src/mbedtls.c b/src/mbedtls.c
index d2ee833..428ecb0 100644
--- a/src/mbedtls.c
+++ b/src/mbedtls.c
@@ -8,10 +8,10 @@
#ifdef USE_MBED_TLS
-#include "include/mbedtls/ccm.h"
-#include "include/mbedtls/md.h"
-#include "include/mbedtls/ctr_drbg.h"
-#include "include/mbedtls/entropy.h"
+#include "mbedtls/ccm.h"
+#include "mbedtls/md.h"
+#include "mbedtls/ctr_drbg.h"
+#include "mbedtls/entropy.h"
bool FUseCompressed = true;