Merge pull request #6629 from concatime/cmake-config-dir

Install CMake files in MbedTLS dir
This commit is contained in:
Manuel Pégourié-Gonnard 2022-12-14 10:30:52 +01:00 committed by GitHub
commit ebf322ddf6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 3 deletions

View file

@ -355,7 +355,7 @@ if(NOT DISABLE_PACKAGE_CONFIG_AND_INSTALL)
install( install(
FILES "${CMAKE_CURRENT_BINARY_DIR}/cmake/MbedTLSConfig.cmake" FILES "${CMAKE_CURRENT_BINARY_DIR}/cmake/MbedTLSConfig.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/cmake/MbedTLSConfigVersion.cmake" "${CMAKE_CURRENT_BINARY_DIR}/cmake/MbedTLSConfigVersion.cmake"
DESTINATION "cmake") DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/MbedTLS")
export( export(
EXPORT MbedTLSTargets EXPORT MbedTLSTargets
@ -365,7 +365,7 @@ if(NOT DISABLE_PACKAGE_CONFIG_AND_INSTALL)
install( install(
EXPORT MbedTLSTargets EXPORT MbedTLSTargets
NAMESPACE MbedTLS:: NAMESPACE MbedTLS::
DESTINATION "cmake" DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/MbedTLS"
FILE "MbedTLSTargets.cmake") FILE "MbedTLSTargets.cmake")
if(CMAKE_VERSION VERSION_GREATER 3.15 OR CMAKE_VERSION VERSION_EQUAL 3.15) if(CMAKE_VERSION VERSION_GREATER 3.15 OR CMAKE_VERSION VERSION_EQUAL 3.15)

View file

@ -0,0 +1,3 @@
Changes
* Install the .cmake files into CMAKE_INSTALL_LIBDIR/cmake/MbedTLS,
typically /usr/lib/cmake/MbedTLS.

View file

@ -26,7 +26,7 @@ execute_process(
# Locate the package. # Locate the package.
# #
set(MbedTLS_DIR "${MbedTLS_INSTALL_DIR}/cmake") list(INSERT CMAKE_PREFIX_PATH 0 "${MbedTLS_INSTALL_DIR}")
find_package(MbedTLS REQUIRED) find_package(MbedTLS REQUIRED)
# #