From b044efeb61741c46e8bfba395a85e6625542591f Mon Sep 17 00:00:00 2001 From: Luc Schrijvers Date: Thu, 23 Oct 2025 11:35:24 +0200 Subject: [PATCH 1/4] Use GNUInstallDirs CMAKE_INSTALL_INCLUDEDDIR path for headers installation Signed-off-by: Luc Schrijvers --- 3rdparty/everest/CMakeLists.txt | 2 +- 3rdparty/p256-m/CMakeLists.txt | 2 +- include/CMakeLists.txt | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/3rdparty/everest/CMakeLists.txt b/3rdparty/everest/CMakeLists.txt index e0e5adecd1..f105c894ef 100644 --- a/3rdparty/everest/CMakeLists.txt +++ b/3rdparty/everest/CMakeLists.txt @@ -29,7 +29,7 @@ endif() if(INSTALL_MBEDTLS_HEADERS) install(DIRECTORY include/everest - DESTINATION include + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} FILE_PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ DIRECTORY_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE FILES_MATCHING PATTERN "*.h") diff --git a/3rdparty/p256-m/CMakeLists.txt b/3rdparty/p256-m/CMakeLists.txt index 2ef0d48b7d..884002e3c6 100644 --- a/3rdparty/p256-m/CMakeLists.txt +++ b/3rdparty/p256-m/CMakeLists.txt @@ -27,7 +27,7 @@ endif() if(INSTALL_MBEDTLS_HEADERS) install(DIRECTORY :${CMAKE_CURRENT_SOURCE_DIR} - DESTINATION include + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} FILE_PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ DIRECTORY_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE FILES_MATCHING PATTERN "*.h") diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index e11e2715af..2df666118f 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -6,11 +6,11 @@ if(INSTALL_MBEDTLS_HEADERS) file(GLOB psa_headers "psa/*.h") install(FILES ${headers} - DESTINATION include/mbedtls + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/mbedtls PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ) install(FILES ${psa_headers} - DESTINATION include/psa + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/psa PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ) endif(INSTALL_MBEDTLS_HEADERS) From 08d88fcf72fb935483e0f9df5f0885600aef97af Mon Sep 17 00:00:00 2001 From: Luc Schrijvers Date: Fri, 24 Oct 2025 09:29:22 +0200 Subject: [PATCH 2/4] add changelog change Signed-off-by: Luc Schrijvers --- ChangeLog.d/gnuinstalldirs_include.txt | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 ChangeLog.d/gnuinstalldirs_include.txt diff --git a/ChangeLog.d/gnuinstalldirs_include.txt b/ChangeLog.d/gnuinstalldirs_include.txt new file mode 100644 index 0000000000..1e15768a5f --- /dev/null +++ b/ChangeLog.d/gnuinstalldirs_include.txt @@ -0,0 +1,2 @@ +Bugfix + * CMake now installs headers to `CMAKE_INSTALL_INCLUDEDIR` instead of the hard-coded `include` directory. From 9644a688f3b8c08d271f595b921133f4a7fa0db3 Mon Sep 17 00:00:00 2001 From: Schrijvers Luc Date: Fri, 24 Oct 2025 10:59:27 +0200 Subject: [PATCH 3/4] Update ChangeLog.d/gnuinstalldirs_include.txt Co-authored-by: Ronald Cron Signed-off-by: Schrijvers Luc --- ChangeLog.d/gnuinstalldirs_include.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ChangeLog.d/gnuinstalldirs_include.txt b/ChangeLog.d/gnuinstalldirs_include.txt index 1e15768a5f..7e0782d1e1 100644 --- a/ChangeLog.d/gnuinstalldirs_include.txt +++ b/ChangeLog.d/gnuinstalldirs_include.txt @@ -1,2 +1,3 @@ Bugfix - * CMake now installs headers to `CMAKE_INSTALL_INCLUDEDIR` instead of the hard-coded `include` directory. + * CMake now installs headers to `CMAKE_INSTALL_INCLUDEDIR` instead of the + hard-coded `include` directory. From 7a399a6ed6f5c10fc5d299694c7cb509325ccd34 Mon Sep 17 00:00:00 2001 From: Luc Schrijvers Date: Fri, 24 Oct 2025 11:05:58 +0200 Subject: [PATCH 4/4] Add library/CMakeList.txt to the changes Signed-off-by: Luc Schrijvers --- 3rdparty/everest/CMakeLists.txt | 2 +- 3rdparty/p256-m/CMakeLists.txt | 2 +- library/CMakeLists.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/3rdparty/everest/CMakeLists.txt b/3rdparty/everest/CMakeLists.txt index f105c894ef..ee7f0e4b9a 100644 --- a/3rdparty/everest/CMakeLists.txt +++ b/3rdparty/everest/CMakeLists.txt @@ -8,7 +8,7 @@ add_library(${everest_target} target_include_directories(${everest_target} PUBLIC $ $ - $ + $ PRIVATE include/everest include/everest/kremlib ${MBEDTLS_DIR}/library/) diff --git a/3rdparty/p256-m/CMakeLists.txt b/3rdparty/p256-m/CMakeLists.txt index 884002e3c6..0e6c6d868b 100644 --- a/3rdparty/p256-m/CMakeLists.txt +++ b/3rdparty/p256-m/CMakeLists.txt @@ -8,7 +8,7 @@ target_include_directories(${p256m_target} PUBLIC $ $ $ - $ + $ PRIVATE ${MBEDTLS_DIR}/library/) # Pass-through MBEDTLS_CONFIG_FILE and MBEDTLS_USER_CONFIG_FILE diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt index 48347938b2..479da96008 100644 --- a/library/CMakeLists.txt +++ b/library/CMakeLists.txt @@ -349,7 +349,7 @@ foreach(target IN LISTS target_libraries) # of /library (which currently means: under /3rdparty). target_include_directories(${target} PUBLIC $ - $ + $ PRIVATE ${MBEDTLS_DIR}/library/ # Needed to include psa_crypto_driver_wrappers.h ${CMAKE_CURRENT_BINARY_DIR})