Skip to content

Commit

Permalink
Merge pull request #186 from simonqhughes/psa-storage-and-cmake-fix
Browse files Browse the repository at this point in the history
Add CMake option for explicitly link library to trusted_storage
  • Loading branch information
Patater authored Jul 24, 2019
2 parents b992313 + 6763fe4 commit 456674d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions library/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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." OFF)

# 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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 456674d

Please sign in to comment.