Skip to content

Commit 32b597b

Browse files
Merge pull request #10469 from Begasus/includedir
Use GNUInstallDirs CMAKE_INSTALL_INCLUDEDDIR path for headers installation
2 parents 4624f50 + ffc2606 commit 32b597b

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Bugfix
2+
* CMake now installs headers to `CMAKE_INSTALL_INCLUDEDIR` instead of the
3+
hard-coded `include` directory.

include/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ if(INSTALL_MBEDTLS_HEADERS)
55
file(GLOB headers "mbedtls/*.h")
66

77
install(FILES ${headers}
8-
DESTINATION include/mbedtls
8+
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/mbedtls
99
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
1010

1111
file(GLOB private_headers "mbedtls/private/*.h")
1212

1313
install(FILES ${private_headers}
14-
DESTINATION include/mbedtls/private
14+
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/mbedtls/private
1515
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
1616
endif(INSTALL_MBEDTLS_HEADERS)
1717

library/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ foreach(target IN LISTS target_libraries)
241241
PUBLIC $<BUILD_INTERFACE:${MBEDTLS_DIR}/include/>
242242
$<BUILD_INTERFACE:${MBEDTLS_DIR}/tf-psa-crypto/include/>
243243
$<BUILD_INTERFACE:${MBEDTLS_DIR}/tf-psa-crypto/drivers/builtin/include/>
244-
$<INSTALL_INTERFACE:include/>
244+
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
245245
PRIVATE ${MBEDTLS_DIR}/library/
246246
${MBEDTLS_DIR}/tf-psa-crypto/core
247247
${MBEDTLS_DIR}/tf-psa-crypto/drivers/builtin/src

0 commit comments

Comments
 (0)