| Manuel Pégourié-Gonnard | 9014b6f | 2015-01-27 15:44:46 +0000 | [diff] [blame] | 1 | option(USE_STATIC_MBEDTLS_LIBRARY "Build mbed TLS static library." ON) | 
|  | 2 | option(USE_SHARED_MBEDTLS_LIBRARY "Build mbed TLS shared library." OFF) | 
| Manuel Pégourié-Gonnard | cfa9a45 | 2015-01-23 13:33:31 +0000 | [diff] [blame] | 3 | option(LINK_WITH_PTHREAD "Explicitly link mbed TLS library to pthread." OFF) | 
| Moshe Shahar | 6763fe4 | 2019-07-24 14:19:35 +0300 | [diff] [blame] | 4 | option(LINK_WITH_TRUSTED_STORAGE "Explicitly link mbed TLS library to trusted_storage." OFF) | 
| Paul Bakker | 9d3a7e4 | 2011-01-05 15:24:43 +0000 | [diff] [blame] | 5 |  | 
| Ashley Duncan | d85a7e9 | 2019-04-29 20:35:06 +1200 | [diff] [blame] | 6 | # Set the project root directory if it's not already defined, as may happen if | 
|  | 7 | # the library folder is included directly by a parent project, without | 
|  | 8 | # including the top level CMakeLists.txt. | 
|  | 9 | if(NOT DEFINED MBEDTLS_DIR) | 
|  | 10 | set(MBEDTLS_DIR ${CMAKE_SOURCE_DIR}) | 
|  | 11 | endif() | 
| Paul Bakker | 9d3a7e4 | 2011-01-05 15:24:43 +0000 | [diff] [blame] | 12 |  | 
| Manuel Pégourié-Gonnard | 463e09d | 2015-06-24 11:54:19 +0200 | [diff] [blame] | 13 | set(src_crypto | 
|  | 14 | aes.c | 
|  | 15 | aesni.c | 
|  | 16 | arc4.c | 
| Markku-Juhani O. Saarinen | 3c0b53b | 2017-11-30 16:00:34 +0000 | [diff] [blame] | 17 | aria.c | 
| Manuel Pégourié-Gonnard | 463e09d | 2015-06-24 11:54:19 +0200 | [diff] [blame] | 18 | asn1parse.c | 
|  | 19 | asn1write.c | 
|  | 20 | base64.c | 
|  | 21 | bignum.c | 
|  | 22 | blowfish.c | 
|  | 23 | camellia.c | 
|  | 24 | ccm.c | 
| Daniel King | 34b822c | 2016-05-15 17:28:08 -0300 | [diff] [blame] | 25 | chacha20.c | 
| Manuel Pégourié-Gonnard | dca3a5d | 2018-05-07 10:43:27 +0200 | [diff] [blame] | 26 | chachapoly.c | 
| Manuel Pégourié-Gonnard | 463e09d | 2015-06-24 11:54:19 +0200 | [diff] [blame] | 27 | cipher.c | 
|  | 28 | cipher_wrap.c | 
| Robert Cragie | dc5c7b9 | 2015-12-11 15:49:45 +0000 | [diff] [blame] | 29 | cmac.c | 
| Manuel Pégourié-Gonnard | 463e09d | 2015-06-24 11:54:19 +0200 | [diff] [blame] | 30 | ctr_drbg.c | 
|  | 31 | des.c | 
|  | 32 | dhm.c | 
|  | 33 | ecdh.c | 
|  | 34 | ecdsa.c | 
| Manuel Pégourié-Gonnard | 4d8685b | 2015-08-05 15:44:42 +0200 | [diff] [blame] | 35 | ecjpake.c | 
| Manuel Pégourié-Gonnard | 463e09d | 2015-06-24 11:54:19 +0200 | [diff] [blame] | 36 | ecp.c | 
|  | 37 | ecp_curves.c | 
|  | 38 | entropy.c | 
|  | 39 | entropy_poll.c | 
|  | 40 | error.c | 
|  | 41 | gcm.c | 
|  | 42 | havege.c | 
| Thomas Fossati | 656864b | 2016-07-17 08:51:22 +0100 | [diff] [blame] | 43 | hkdf.c | 
| Manuel Pégourié-Gonnard | 463e09d | 2015-06-24 11:54:19 +0200 | [diff] [blame] | 44 | hmac_drbg.c | 
|  | 45 | md.c | 
|  | 46 | md2.c | 
|  | 47 | md4.c | 
|  | 48 | md5.c | 
| Manuel Pégourié-Gonnard | 463e09d | 2015-06-24 11:54:19 +0200 | [diff] [blame] | 49 | memory_buffer_alloc.c | 
| Ron Eldor | cb349ac | 2018-07-15 09:29:47 +0300 | [diff] [blame] | 50 | nist_kw.c | 
| Manuel Pégourié-Gonnard | 463e09d | 2015-06-24 11:54:19 +0200 | [diff] [blame] | 51 | oid.c | 
|  | 52 | padlock.c | 
|  | 53 | pem.c | 
|  | 54 | pk.c | 
|  | 55 | pk_wrap.c | 
|  | 56 | pkcs12.c | 
|  | 57 | pkcs5.c | 
|  | 58 | pkparse.c | 
|  | 59 | pkwrite.c | 
|  | 60 | platform.c | 
| Andres Amaya Garcia | bc7bdbf | 2018-04-24 08:29:20 -0500 | [diff] [blame] | 61 | platform_util.c | 
| Daniel King | adc32c0 | 2016-05-16 18:25:45 -0300 | [diff] [blame] | 62 | poly1305.c | 
| Gilles Peskine | e59236f | 2018-01-27 23:32:46 +0100 | [diff] [blame] | 63 | psa_crypto.c | 
| Steven Cooreman | cd84cb4 | 2020-07-16 20:28:36 +0200 | [diff] [blame] | 64 | psa_crypto_driver_wrappers.c | 
| Gilles Peskine | a899a72 | 2019-06-24 14:06:43 +0200 | [diff] [blame] | 65 | psa_crypto_se.c | 
| Gilles Peskine | 961849f | 2018-11-30 18:54:54 +0100 | [diff] [blame] | 66 | psa_crypto_slot_management.c | 
| Darryl Green | db2b8db | 2018-06-15 13:06:04 +0100 | [diff] [blame] | 67 | psa_crypto_storage.c | 
| Gilles Peskine | 6194dc2 | 2018-11-16 22:24:15 +0100 | [diff] [blame] | 68 | psa_its_file.c | 
| Manuel Pégourié-Gonnard | 463e09d | 2015-06-24 11:54:19 +0200 | [diff] [blame] | 69 | ripemd160.c | 
|  | 70 | rsa.c | 
| Hanno Becker | a565f54 | 2017-10-11 11:00:19 +0100 | [diff] [blame] | 71 | rsa_internal.c | 
| Manuel Pégourié-Gonnard | 463e09d | 2015-06-24 11:54:19 +0200 | [diff] [blame] | 72 | sha1.c | 
|  | 73 | sha256.c | 
|  | 74 | sha512.c | 
|  | 75 | threading.c | 
| Manuel Pégourié-Gonnard | 21dcc1e | 2015-06-25 10:59:15 +0200 | [diff] [blame] | 76 | timing.c | 
| Manuel Pégourié-Gonnard | 463e09d | 2015-06-24 11:54:19 +0200 | [diff] [blame] | 77 | version.c | 
|  | 78 | version_features.c | 
|  | 79 | xtea.c | 
|  | 80 | ) | 
|  | 81 |  | 
| Christoph M. Wintersteiger | 655ddab | 2019-01-21 17:26:19 +0000 | [diff] [blame] | 82 | list(APPEND src_crypto ${thirdparty_src}) | 
|  | 83 |  | 
| Manuel Pégourié-Gonnard | 463e09d | 2015-06-24 11:54:19 +0200 | [diff] [blame] | 84 | set(src_x509 | 
|  | 85 | certs.c | 
|  | 86 | pkcs11.c | 
|  | 87 | x509.c | 
|  | 88 | x509_create.c | 
|  | 89 | x509_crl.c | 
|  | 90 | x509_crt.c | 
|  | 91 | x509_csr.c | 
|  | 92 | x509write_crt.c | 
|  | 93 | x509write_csr.c | 
|  | 94 | ) | 
|  | 95 |  | 
|  | 96 | set(src_tls | 
|  | 97 | debug.c | 
| Andres AG | 788aa4a | 2016-09-14 14:32:09 +0100 | [diff] [blame] | 98 | net_sockets.c | 
| Manuel Pégourié-Gonnard | 463e09d | 2015-06-24 11:54:19 +0200 | [diff] [blame] | 99 | ssl_cache.c | 
|  | 100 | ssl_ciphersuites.c | 
|  | 101 | ssl_cli.c | 
|  | 102 | ssl_cookie.c | 
| Hanno Becker | 6e7051a | 2020-02-05 11:33:54 +0000 | [diff] [blame] | 103 | ssl_msg.c | 
| Manuel Pégourié-Gonnard | 463e09d | 2015-06-24 11:54:19 +0200 | [diff] [blame] | 104 | ssl_srv.c | 
|  | 105 | ssl_ticket.c | 
| Hanno Becker | 471c0c9 | 2020-02-05 11:32:03 +0000 | [diff] [blame] | 106 | ssl_tls.c | 
| Hanno Becker | be9d664 | 2020-08-21 13:20:06 +0100 | [diff] [blame] | 107 | ssl_tls13_keys.c | 
| Manuel Pégourié-Gonnard | 463e09d | 2015-06-24 11:54:19 +0200 | [diff] [blame] | 108 | ) | 
|  | 109 |  | 
| Paul Bakker | 76f0311 | 2013-11-28 17:20:04 +0100 | [diff] [blame] | 110 | if(CMAKE_COMPILER_IS_GNUCC) | 
| Manuel Pégourié-Gonnard | 216a183 | 2015-06-25 09:20:03 +0200 | [diff] [blame] | 111 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wmissing-declarations -Wmissing-prototypes") | 
| Paul Bakker | 76f0311 | 2013-11-28 17:20:04 +0100 | [diff] [blame] | 112 | endif(CMAKE_COMPILER_IS_GNUCC) | 
|  | 113 |  | 
| Manuel Pégourié-Gonnard | 3185545 | 2014-06-25 15:59:50 +0200 | [diff] [blame] | 114 | if(CMAKE_COMPILER_IS_CLANG) | 
| Manuel Pégourié-Gonnard | 216a183 | 2015-06-25 09:20:03 +0200 | [diff] [blame] | 115 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wmissing-declarations -Wmissing-prototypes -Wdocumentation -Wno-documentation-deprecated-sync -Wunreachable-code") | 
| Manuel Pégourié-Gonnard | 3185545 | 2014-06-25 15:59:50 +0200 | [diff] [blame] | 116 | endif(CMAKE_COMPILER_IS_CLANG) | 
|  | 117 |  | 
| Manuel Pégourié-Gonnard | ba2c876 | 2015-06-25 09:35:46 +0200 | [diff] [blame] | 118 | if(WIN32) | 
|  | 119 | set(libs ${libs} ws2_32) | 
|  | 120 | endif(WIN32) | 
|  | 121 |  | 
| Andres Amaya Garcia | bf7fe4f | 2018-06-21 20:21:38 +0100 | [diff] [blame] | 122 | if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") | 
| TabascoEye | 7f3ef27 | 2018-04-27 13:14:59 +0200 | [diff] [blame] | 123 | SET(CMAKE_C_ARCHIVE_CREATE   "<CMAKE_AR> Scr <TARGET> <LINK_FLAGS> <OBJECTS>") | 
|  | 124 | SET(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> Scr <TARGET> <LINK_FLAGS> <OBJECTS>") | 
|  | 125 | SET(CMAKE_C_ARCHIVE_FINISH   "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>") | 
|  | 126 | SET(CMAKE_CXX_ARCHIVE_FINISH "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>") | 
| Andres Amaya Garcia | bf7fe4f | 2018-06-21 20:21:38 +0100 | [diff] [blame] | 127 | endif() | 
| TabascoEye | 7f3ef27 | 2018-04-27 13:14:59 +0200 | [diff] [blame] | 128 |  | 
| Augustin Cavalier | 60bc47d | 2018-04-11 20:27:32 -0400 | [diff] [blame] | 129 | if(HAIKU) | 
| Simon Butcher | 6331cb0 | 2018-07-10 11:48:42 +0100 | [diff] [blame] | 130 | set(libs ${libs} network) | 
| Augustin Cavalier | 60bc47d | 2018-04-11 20:27:32 -0400 | [diff] [blame] | 131 | endif(HAIKU) | 
|  | 132 |  | 
| Manuel Pégourié-Gonnard | ba2c876 | 2015-06-25 09:35:46 +0200 | [diff] [blame] | 133 | if(USE_PKCS11_HELPER_LIBRARY) | 
|  | 134 | set(libs ${libs} pkcs11-helper) | 
|  | 135 | endif(USE_PKCS11_HELPER_LIBRARY) | 
|  | 136 |  | 
|  | 137 | if(ENABLE_ZLIB_SUPPORT) | 
|  | 138 | set(libs ${libs} ${ZLIB_LIBRARIES}) | 
|  | 139 | endif(ENABLE_ZLIB_SUPPORT) | 
|  | 140 |  | 
|  | 141 | if(LINK_WITH_PTHREAD) | 
|  | 142 | set(libs ${libs} pthread) | 
|  | 143 | endif() | 
|  | 144 |  | 
| Moshe Shahar | 7e36765 | 2019-07-15 15:50:19 +0300 | [diff] [blame] | 145 | if(LINK_WITH_TRUSTED_STORAGE) | 
|  | 146 | set(libs ${libs} trusted_storage) | 
|  | 147 | endif() | 
|  | 148 |  | 
| Manuel Pégourié-Gonnard | 9014b6f | 2015-01-27 15:44:46 +0000 | [diff] [blame] | 149 | if (NOT USE_STATIC_MBEDTLS_LIBRARY AND NOT USE_SHARED_MBEDTLS_LIBRARY) | 
| Manuel Pégourié-Gonnard | 216a183 | 2015-06-25 09:20:03 +0200 | [diff] [blame] | 150 | message(FATAL_ERROR "Need to choose static or shared mbedtls build!") | 
| Manuel Pégourié-Gonnard | 9014b6f | 2015-01-27 15:44:46 +0000 | [diff] [blame] | 151 | endif(NOT USE_STATIC_MBEDTLS_LIBRARY AND NOT USE_SHARED_MBEDTLS_LIBRARY) | 
| Paul Bakker | 9d3a7e4 | 2011-01-05 15:24:43 +0000 | [diff] [blame] | 152 |  | 
| Raef Coles | 995c66f | 2020-10-13 16:30:41 +0100 | [diff] [blame] | 153 | set(mbedtls_target    "${MBEDTLS_TARGET_PREFIX}mbedtls") | 
|  | 154 | set(mbedx509_target   "${MBEDTLS_TARGET_PREFIX}mbedx509") | 
|  | 155 | set(mbedcrypto_target "${MBEDTLS_TARGET_PREFIX}mbedcrypto") | 
|  | 156 |  | 
|  | 157 | set(mbedtls_target    ${mbedtls_target}    PARENT_SCOPE) | 
|  | 158 | set(mbedx509_target   ${mbedx509_target}   PARENT_SCOPE) | 
|  | 159 | set(mbedcrypto_target ${mbedcrypto_target} PARENT_SCOPE) | 
|  | 160 |  | 
|  | 161 | if (USE_STATIC_MBEDTLS_LIBRARY) | 
|  | 162 | set(mbedtls_static_target    ${mbedtls_target}) | 
|  | 163 | set(mbedx509_static_target   ${mbedx509_target}) | 
|  | 164 | set(mbedcrypto_static_target ${mbedcrypto_target}) | 
|  | 165 | endif() | 
|  | 166 |  | 
|  | 167 | set(target_libraries ${mbedcrypto_target} ${mbedx509_target} ${mbedtls_target}) | 
| Gilles Peskine | 3ca8a92 | 2020-07-02 13:07:37 +0200 | [diff] [blame] | 168 |  | 
| Manuel Pégourié-Gonnard | 9014b6f | 2015-01-27 15:44:46 +0000 | [diff] [blame] | 169 | if(USE_STATIC_MBEDTLS_LIBRARY AND USE_SHARED_MBEDTLS_LIBRARY) | 
| Raef Coles | 995c66f | 2020-10-13 16:30:41 +0100 | [diff] [blame] | 170 | string(APPEND mbedtls_static_target    "_static") | 
|  | 171 | string(APPEND mbedx509_static_target   "_static") | 
|  | 172 | string(APPEND mbedcrypto_static_target "_static") | 
|  | 173 |  | 
| Gilles Peskine | 3ca8a92 | 2020-07-02 13:07:37 +0200 | [diff] [blame] | 174 | list(APPEND target_libraries | 
| Raef Coles | 995c66f | 2020-10-13 16:30:41 +0100 | [diff] [blame] | 175 | ${mbedcrypto_static_target} | 
|  | 176 | ${mbedx509_static_target} | 
|  | 177 | ${mbedtls_static_target}) | 
| hasufell | 3c6409b | 2014-03-06 15:49:08 +0100 | [diff] [blame] | 178 | endif() | 
| Paul Bakker | 9d3a7e4 | 2011-01-05 15:24:43 +0000 | [diff] [blame] | 179 |  | 
| Manuel Pégourié-Gonnard | 9014b6f | 2015-01-27 15:44:46 +0000 | [diff] [blame] | 180 | if(USE_STATIC_MBEDTLS_LIBRARY) | 
| Manuel Pégourié-Gonnard | c7781ad | 2015-06-25 09:49:02 +0200 | [diff] [blame] | 181 | add_library(${mbedcrypto_static_target} STATIC ${src_crypto}) | 
|  | 182 | set_target_properties(${mbedcrypto_static_target} PROPERTIES OUTPUT_NAME mbedcrypto) | 
| Raef Coles | 4762edd | 2020-10-13 16:31:41 +0100 | [diff] [blame] | 183 | target_link_libraries(${mbedcrypto_static_target} PUBLIC ${libs}) | 
| Manuel Pégourié-Gonnard | c7781ad | 2015-06-25 09:49:02 +0200 | [diff] [blame] | 184 |  | 
| Gilles Peskine | 55d5353 | 2020-03-09 17:48:13 +0100 | [diff] [blame] | 185 | add_library(${mbedx509_static_target} STATIC ${src_x509}) | 
|  | 186 | set_target_properties(${mbedx509_static_target} PROPERTIES OUTPUT_NAME mbedx509) | 
| Raef Coles | 4762edd | 2020-10-13 16:31:41 +0100 | [diff] [blame] | 187 | target_link_libraries(${mbedx509_static_target} PUBLIC ${libs} ${mbedcrypto_static_target}) | 
| Manuel Pégourié-Gonnard | c7781ad | 2015-06-25 09:49:02 +0200 | [diff] [blame] | 188 |  | 
| Gilles Peskine | 55d5353 | 2020-03-09 17:48:13 +0100 | [diff] [blame] | 189 | add_library(${mbedtls_static_target} STATIC ${src_tls}) | 
|  | 190 | set_target_properties(${mbedtls_static_target} PROPERTIES OUTPUT_NAME mbedtls) | 
| Raef Coles | 4762edd | 2020-10-13 16:31:41 +0100 | [diff] [blame] | 191 | target_link_libraries(${mbedtls_static_target} PUBLIC ${libs} ${mbedx509_static_target}) | 
| Manuel Pégourié-Gonnard | e1d34d1 | 2015-06-25 14:53:13 +0200 | [diff] [blame] | 192 | endif(USE_STATIC_MBEDTLS_LIBRARY) | 
| Paul Bakker | 9d3a7e4 | 2011-01-05 15:24:43 +0000 | [diff] [blame] | 193 |  | 
| Manuel Pégourié-Gonnard | 9014b6f | 2015-01-27 15:44:46 +0000 | [diff] [blame] | 194 | if(USE_SHARED_MBEDTLS_LIBRARY) | 
| Raef Coles | 995c66f | 2020-10-13 16:30:41 +0100 | [diff] [blame] | 195 | add_library(${mbedcrypto_target} SHARED ${src_crypto}) | 
|  | 196 | set_target_properties(${mbedcrypto_target} PROPERTIES VERSION 2.24.0 SOVERSION 5) | 
| Raef Coles | 4762edd | 2020-10-13 16:31:41 +0100 | [diff] [blame] | 197 | target_link_libraries(${mbedcrypto_target} PUBLIC ${libs}) | 
| Paul Bakker | 2a5c7a8 | 2012-05-10 21:54:28 +0000 | [diff] [blame] | 198 |  | 
| Raef Coles | 995c66f | 2020-10-13 16:30:41 +0100 | [diff] [blame] | 199 | add_library(${mbedx509_target} SHARED ${src_x509}) | 
|  | 200 | set_target_properties(${mbedx509_target} PROPERTIES VERSION 2.24.0 SOVERSION 1) | 
| Raef Coles | 4762edd | 2020-10-13 16:31:41 +0100 | [diff] [blame] | 201 | target_link_libraries(${mbedx509_target} PUBLIC ${libs} ${mbedcrypto_target}) | 
| Manuel Pégourié-Gonnard | c7781ad | 2015-06-25 09:49:02 +0200 | [diff] [blame] | 202 |  | 
| Raef Coles | 995c66f | 2020-10-13 16:30:41 +0100 | [diff] [blame] | 203 | add_library(${mbedtls_target} SHARED ${src_tls}) | 
|  | 204 | set_target_properties(${mbedtls_target} PROPERTIES VERSION 2.24.0 SOVERSION 13) | 
| Raef Coles | 4762edd | 2020-10-13 16:31:41 +0100 | [diff] [blame] | 205 | target_link_libraries(${mbedtls_target} PUBLIC ${libs} ${mbedx509_target}) | 
| Manuel Pégourié-Gonnard | 9014b6f | 2015-01-27 15:44:46 +0000 | [diff] [blame] | 206 | endif(USE_SHARED_MBEDTLS_LIBRARY) | 
| Manuel Pégourié-Gonnard | e1d34d1 | 2015-06-25 14:53:13 +0200 | [diff] [blame] | 207 |  | 
| Gilles Peskine | 3ca8a92 | 2020-07-02 13:07:37 +0200 | [diff] [blame] | 208 | foreach(target IN LISTS target_libraries) | 
| Gilles Peskine | 76dd3aa | 2020-07-02 15:58:37 +0200 | [diff] [blame] | 209 | # Include public header files from /include and other directories | 
|  | 210 | # declared by /3rdparty/**/CMakeLists.txt. Include private header files | 
|  | 211 | # from /library and others declared by /3rdparty/**/CMakeLists.txt. | 
|  | 212 | # /library needs to be listed explicitly when building .c files outside | 
|  | 213 | # of /library (which currently means: under /3rdparty). | 
| Gilles Peskine | 3ca8a92 | 2020-07-02 13:07:37 +0200 | [diff] [blame] | 214 | target_include_directories(${target} | 
|  | 215 | PUBLIC ${MBEDTLS_DIR}/include/ | 
|  | 216 | PUBLIC ${thirdparty_inc_public} | 
| Gilles Peskine | dedff7a | 2020-07-02 13:13:27 +0200 | [diff] [blame] | 217 | PRIVATE ${MBEDTLS_DIR}/library/ | 
| Gilles Peskine | 3ca8a92 | 2020-07-02 13:07:37 +0200 | [diff] [blame] | 218 | PRIVATE ${thirdparty_inc}) | 
|  | 219 | target_compile_definitions(${target} | 
|  | 220 | PRIVATE ${thirdparty_def}) | 
|  | 221 | install(TARGETS ${target} | 
| hasufell | 3c6409b | 2014-03-06 15:49:08 +0100 | [diff] [blame] | 222 | DESTINATION ${LIB_INSTALL_DIR} | 
| Gilles Peskine | 280165c | 2020-07-02 13:19:17 +0200 | [diff] [blame] | 223 | PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ) | 
| Gilles Peskine | 3ca8a92 | 2020-07-02 13:07:37 +0200 | [diff] [blame] | 224 | endforeach(target) | 
| Manuel Pégourié-Gonnard | e1d34d1 | 2015-06-25 14:53:13 +0200 | [diff] [blame] | 225 |  | 
| Raef Coles | 995c66f | 2020-10-13 16:30:41 +0100 | [diff] [blame] | 226 | set(lib_target "${MBEDTLS_TARGET_PREFIX}lib") | 
|  | 227 |  | 
|  | 228 | add_custom_target(${lib_target} DEPENDS ${mbedcrypto_target} ${mbedx509_target} ${mbedtls_target}) | 
| Gilles Peskine | 55d5353 | 2020-03-09 17:48:13 +0100 | [diff] [blame] | 229 | if(USE_STATIC_MBEDTLS_LIBRARY AND USE_SHARED_MBEDTLS_LIBRARY) | 
| Raef Coles | 995c66f | 2020-10-13 16:30:41 +0100 | [diff] [blame] | 230 | add_dependencies(${lib_target} ${mbedcrypto_static_target} ${mbedx509_static_target} ${mbedtls_static_target}) | 
| Manuel Pégourié-Gonnard | e1d34d1 | 2015-06-25 14:53:13 +0200 | [diff] [blame] | 231 | endif() |