Raef Coles | 1971538 | 2020-07-10 09:50:17 +0100 | [diff] [blame^] | 1 | From 37095546fc7eca29d5a790a7d7d0a1314b173dd3 Mon Sep 17 00:00:00 2001 |
| 2 | From: Raef Coles <raef.coles@arm.com> |
| 3 | Date: Wed, 2 Sep 2020 10:04:05 +0100 |
| 4 | Subject: [PATCH 3/6] Add include/mbedtls to include property of targets |
| 5 | |
| 6 | Signed-off-by: Raef Coles <raef.coles@arm.com> |
| 7 | --- |
| 8 | CMakeLists.txt | 3 +-- |
| 9 | library/CMakeLists.txt | 8 ++++++-- |
| 10 | 2 files changed, 7 insertions(+), 4 deletions(-) |
| 11 | |
| 12 | diff --git a/CMakeLists.txt b/CMakeLists.txt |
| 13 | index 5d970b9fd..949a50b2b 100644 |
| 14 | --- a/CMakeLists.txt |
| 15 | +++ b/CMakeLists.txt |
| 16 | @@ -217,14 +217,13 @@ if(ENABLE_ZLIB_SUPPORT) |
| 17 | endif(ZLIB_FOUND) |
| 18 | endif(ENABLE_ZLIB_SUPPORT) |
| 19 | |
| 20 | -add_subdirectory(include) |
| 21 | - |
| 22 | add_subdirectory(3rdparty) |
| 23 | include_directories(${thirdparty_inc}) |
| 24 | list(APPEND libs ${thirdparty_lib}) |
| 25 | add_definitions(${thirdparty_def}) |
| 26 | |
| 27 | add_subdirectory(library) |
| 28 | +add_subdirectory(include) |
| 29 | |
| 30 | if(ENABLE_PROGRAMS) |
| 31 | add_subdirectory(programs) |
| 32 | diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt |
| 33 | index fe74de25d..02cd157bb 100644 |
| 34 | --- a/library/CMakeLists.txt |
| 35 | +++ b/library/CMakeLists.txt |
| 36 | @@ -192,7 +192,9 @@ if(USE_STATIC_MBEDTLS_LIBRARY) |
| 37 | set_target_properties(${mbedcrypto_static_target} PROPERTIES OUTPUT_NAME mbedcrypto) |
| 38 | target_link_libraries(${mbedcrypto_static_target} ${libs}) |
| 39 | target_include_directories(${mbedcrypto_static_target} |
| 40 | - PUBLIC ${MBEDTLS_DIR}/include/) |
| 41 | + PUBLIC ${MBEDTLS_DIR}/include/ |
| 42 | + PUBLIC ${MBEDTLS_DIR}/include/mbedtls/ |
| 43 | + ) |
| 44 | |
| 45 | add_library(${mbedx509_static_target} STATIC ${src_x509}) |
| 46 | set_target_properties(${mbedx509_static_target} PROPERTIES OUTPUT_NAME mbedx509) |
| 47 | @@ -213,7 +215,9 @@ if(USE_SHARED_MBEDTLS_LIBRARY) |
| 48 | set_target_properties(${mbedcrypto_target} PROPERTIES VERSION 2.23.0 SOVERSION 5) |
| 49 | target_link_libraries(${mbedcrypto_target} ${libs}) |
| 50 | target_include_directories(${mbedcrypto_target} |
| 51 | - PUBLIC ${MBEDTLS_DIR}/include/) |
| 52 | + PUBLIC ${MBEDTLS_DIR}/include/ |
| 53 | + PUBLIC ${MBEDTLS_DIR}/include/mbedtls/ |
| 54 | + ) |
| 55 | |
| 56 | add_library(${mbedx509_target} SHARED ${src_x509}) |
| 57 | set_target_properties(${mbedx509_target} PROPERTIES VERSION 2.23.0 SOVERSION 1) |
| 58 | -- |
| 59 | 2.20.1 |
| 60 | |