From 2f369d09b60fc576c9d01ef6830d746a8ccf7d2f Mon Sep 17 00:00:00 2001 From: Mattes D Date: Sun, 3 May 2015 10:01:19 +0200 Subject: Fixed multiple mbedtls inclusion. Ref.: #1880. --- CMakeLists.txt | 2 ++ lib/polarssl.cmake | 11 +++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5b3fd5e7d..76b91e642 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -54,11 +54,13 @@ endif() # This has to be done before any flags have been set up. if(${BUILD_TOOLS}) + message("Building tools") add_subdirectory(Tools/MCADefrag/) add_subdirectory(Tools/ProtoProxy/) endif() if(${BUILD_UNSTABLE_TOOLS}) + message("Building unstable tools") add_subdirectory(Tools/GeneratorPerformanceTest/) endif() diff --git a/lib/polarssl.cmake b/lib/polarssl.cmake index ced70b94e..3506d0fb4 100644 --- a/lib/polarssl.cmake +++ b/lib/polarssl.cmake @@ -1,11 +1,10 @@ -if(NOT TARGET polarssl) +# This script includes PolarSSL, if not already included. +# It is needed for when multiple projects reference PolarSSL. + +if(NOT TARGET mbedtls) message("including polarssl") set(ENABLE_TESTING OFF CACHE BOOL "Disable tests") set(ENABLE_PROGRAMS OFF CACHE BOOL "Disable programs") - if (SELF_TEST) - add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/polarssl/ ${CMAKE_CURRENT_BINARY_DIR}/lib/polarssl) - else() - add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/polarssl/ ${CMAKE_CURRENT_BINARY_DIR}/lib/polarssl EXCLUDE_FROM_ALL) - endif() + add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/polarssl/ ${CMAKE_CURRENT_BINARY_DIR}/lib/polarssl EXCLUDE_FROM_ALL) endif() -- cgit v1.2.3