blob: 755efedd1c29c1f4ae088647c4912d1ff0f5a643 [file] [log] [blame]
Gilles Peskinee820c0a2023-08-03 17:45:20 +02001option(INSTALL_MBEDTLS_HEADERS "Install Mbed TLS headers." ON)
Paul Bakker547f73d2011-01-05 15:07:54 +00002
Manuel Pégourié-Gonnard9014b6f2015-01-27 15:44:46 +00003if(INSTALL_MBEDTLS_HEADERS)
Paul Bakker9bc2f322011-12-11 11:25:30 +00004
Manuel Pégourié-Gonnard216a1832015-06-25 09:20:03 +02005 file(GLOB headers "mbedtls/*.h")
Paul Bakker9bc2f322011-12-11 11:25:30 +00006
Manuel Pégourié-Gonnard216a1832015-06-25 09:20:03 +02007 install(FILES ${headers}
Manuel Pégourié-Gonnard7f809972015-03-09 17:05:11 +00008 DESTINATION include/mbedtls
Paul Bakker547f73d2011-01-05 15:07:54 +00009 PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
Manuel Pégourié-Gonnard9014b6f2015-01-27 15:44:46 +000010endif(INSTALL_MBEDTLS_HEADERS)
Gilles Peskine84052572018-03-21 12:12:47 +010011
Bence Szépkútibb0cfeb2021-05-28 09:42:25 +020012# Make mbedtls_config.h available in an out-of-source build. ssl-opt.sh requires it.
Renz Christian Bagaporod8a40b52019-04-28 13:51:37 +080013if (ENABLE_TESTING AND NOT ${CMAKE_CURRENT_BINARY_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
Gilles Peskine84052572018-03-21 12:12:47 +010014 link_to_source(mbedtls)
15endif()