diff --git a/CMakeLists.txt b/CMakeLists.txt index 21c9925786..d20dbfe735 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -430,7 +430,6 @@ if(ENABLE_TESTING) enable_testing() add_subdirectory(tests) - add_subdirectory(tf-psa-crypto/tests) # additional convenience targets for Unix only if(UNIX) diff --git a/tf-psa-crypto/CMakeLists.txt b/tf-psa-crypto/CMakeLists.txt index 1dc9f9f0db..3669da3ce5 100644 --- a/tf-psa-crypto/CMakeLists.txt +++ b/tf-psa-crypto/CMakeLists.txt @@ -38,3 +38,8 @@ endif() add_subdirectory(include) add_subdirectory(core) add_subdirectory(drivers) + +if(ENABLE_TESTING) + enable_testing() + add_subdirectory(tests) +endif() diff --git a/tf-psa-crypto/tests/CMakeLists.txt b/tf-psa-crypto/tests/CMakeLists.txt index 88f12f8b57..cf25c716fd 100644 --- a/tf-psa-crypto/tests/CMakeLists.txt +++ b/tf-psa-crypto/tests/CMakeLists.txt @@ -1,5 +1,5 @@ set(libs - ${mbedtls_target} + ${mbedcrypto_target} ${CMAKE_THREAD_LIBS_INIT} )