Skip to content

Commit 7e36765

Browse files
author
Moshe Shahar
committed
Add CMake option for explicitly link library to trusted_storage (#2)
option name: LINK_WITH_TRUSTED_STORAGE default value: ON
1 parent bda5a21 commit 7e36765

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

library/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
option(USE_STATIC_MBEDTLS_LIBRARY "Build mbed TLS static library." ON)
22
option(USE_SHARED_MBEDTLS_LIBRARY "Build mbed TLS shared library." OFF)
33
option(LINK_WITH_PTHREAD "Explicitly link mbed TLS library to pthread." OFF)
4+
option(LINK_WITH_TRUSTED_STORAGE "Explicitly link mbed TLS library to trusted_storage." ON)
45

56
# Set the project root directory if it's not already defined, as may happen if
67
# the library folder is included directly by a parent project, without
@@ -125,6 +126,10 @@ if(LINK_WITH_PTHREAD)
125126
set(libs ${libs} pthread)
126127
endif()
127128

129+
if(LINK_WITH_TRUSTED_STORAGE)
130+
set(libs ${libs} trusted_storage)
131+
endif()
132+
128133
if (NOT USE_STATIC_MBEDTLS_LIBRARY AND NOT USE_SHARED_MBEDTLS_LIBRARY)
129134
message(FATAL_ERROR "Need to choose static or shared mbedtls build!")
130135
endif(NOT USE_STATIC_MBEDTLS_LIBRARY AND NOT USE_SHARED_MBEDTLS_LIBRARY)

0 commit comments

Comments
 (0)