From 7e367659452a871086be1c77d386610808bc6656 Mon Sep 17 00:00:00 2001 From: Moshe Shahar Date: Mon, 15 Jul 2019 15:50:19 +0300 Subject: [PATCH] Add CMake option for explicitly link library to trusted_storage (#2) option name: LINK_WITH_TRUSTED_STORAGE default value: ON --- library/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt index 6b2a8508a..cbbaf06fa 100644 --- a/library/CMakeLists.txt +++ b/library/CMakeLists.txt @@ -1,6 +1,7 @@ option(USE_STATIC_MBEDTLS_LIBRARY "Build mbed TLS static library." ON) option(USE_SHARED_MBEDTLS_LIBRARY "Build mbed TLS shared library." OFF) option(LINK_WITH_PTHREAD "Explicitly link mbed TLS library to pthread." OFF) +option(LINK_WITH_TRUSTED_STORAGE "Explicitly link mbed TLS library to trusted_storage." ON) # Set the project root directory if it's not already defined, as may happen if # the library folder is included directly by a parent project, without @@ -125,6 +126,10 @@ if(LINK_WITH_PTHREAD) set(libs ${libs} pthread) endif() +if(LINK_WITH_TRUSTED_STORAGE) + set(libs ${libs} trusted_storage) +endif() + if (NOT USE_STATIC_MBEDTLS_LIBRARY AND NOT USE_SHARED_MBEDTLS_LIBRARY) message(FATAL_ERROR "Need to choose static or shared mbedtls build!") endif(NOT USE_STATIC_MBEDTLS_LIBRARY AND NOT USE_SHARED_MBEDTLS_LIBRARY)