2015-01-27 15:44:46 +00:00
|
|
|
option(INSTALL_MBEDTLS_HEADERS "Install mbed TLS headers." ON)
|
2011-01-05 15:07:54 +00:00
|
|
|
|
2019-12-03 22:19:53 +00:00
|
|
|
# Declare include headers as PUBLIC to propogate to project consumers
|
|
|
|
target_include_directories(
|
|
|
|
mbedtls
|
|
|
|
PUBLIC ${CMAKE_CURRENT_LIST_DIR}
|
|
|
|
)
|
|
|
|
|
2015-01-27 15:44:46 +00:00
|
|
|
if(INSTALL_MBEDTLS_HEADERS)
|
2011-12-11 11:25:30 +00:00
|
|
|
|
2015-06-25 07:20:03 +00:00
|
|
|
file(GLOB headers "mbedtls/*.h")
|
2011-12-11 11:25:30 +00:00
|
|
|
|
2015-06-25 07:20:03 +00:00
|
|
|
install(FILES ${headers}
|
2015-03-09 17:05:11 +00:00
|
|
|
DESTINATION include/mbedtls
|
2011-01-05 15:07:54 +00:00
|
|
|
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
|
2011-12-11 11:25:30 +00:00
|
|
|
|
2015-01-27 15:44:46 +00:00
|
|
|
endif(INSTALL_MBEDTLS_HEADERS)
|
2018-03-21 11:12:47 +00:00
|
|
|
|
2018-03-22 16:12:46 +00:00
|
|
|
# Make config.h available in an out-of-source build. ssl-opt.sh requires it.
|
2019-04-28 05:51:37 +00:00
|
|
|
if (ENABLE_TESTING AND NOT ${CMAKE_CURRENT_BINARY_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
|
2018-03-21 11:12:47 +00:00
|
|
|
link_to_source(mbedtls)
|
|
|
|
endif()
|