1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-10-31 21:50:31 +03:00

Use GNUInstallDirs CMAKE_INSTALL_INCLUDEDDIR path for headers installation

Signed-off-by: Luc Schrijvers <begasus@gmail.com>
This commit is contained in:
Luc Schrijvers
2025-10-23 08:17:08 +02:00
parent b180696e94
commit ffc2606bf2
3 changed files with 6 additions and 3 deletions

View File

@@ -0,0 +1,3 @@
Bugfix
* CMake now installs headers to `CMAKE_INSTALL_INCLUDEDIR` instead of the
hard-coded `include` directory.

View File

@@ -5,13 +5,13 @@ if(INSTALL_MBEDTLS_HEADERS)
file(GLOB headers "mbedtls/*.h")
install(FILES ${headers}
DESTINATION include/mbedtls
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/mbedtls
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
file(GLOB private_headers "mbedtls/private/*.h")
install(FILES ${private_headers}
DESTINATION include/mbedtls/private
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/mbedtls/private
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
endif(INSTALL_MBEDTLS_HEADERS)

View File

@@ -241,7 +241,7 @@ foreach(target IN LISTS target_libraries)
PUBLIC $<BUILD_INTERFACE:${MBEDTLS_DIR}/include/>
$<BUILD_INTERFACE:${MBEDTLS_DIR}/tf-psa-crypto/include/>
$<BUILD_INTERFACE:${MBEDTLS_DIR}/tf-psa-crypto/drivers/builtin/include/>
$<INSTALL_INTERFACE:include/>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
PRIVATE ${MBEDTLS_DIR}/library/
${MBEDTLS_DIR}/tf-psa-crypto/core
${MBEDTLS_DIR}/tf-psa-crypto/drivers/builtin/src