Bill Roberts | 202a163 | 2024-01-09 13:10:05 -0600 | [diff] [blame] | 1 | if(NOT DISABLE_PACKAGE_CONFIG_AND_INSTALL) |
| 2 | include(JoinPaths.cmake) |
| 3 | join_paths(PKGCONFIG_INCLUDEDIR "\${prefix}" "${CMAKE_INSTALL_INCLUDEDIR}") |
| 4 | join_paths(PKGCONFIG_LIBDIR "\${prefix}" "${CMAKE_INSTALL_LIBDIR}") |
| 5 | |
| 6 | #define these manually since minimum CMAKE version is not 3.9 for DESCRIPTION and 3.12 for HOMEPAGE_URL usage in project() below. |
| 7 | # Prefix with something that won't clash with newer versions of CMAKE. |
| 8 | set(PKGCONFIG_PROJECT_DESCRIPTION "Mbed TLS is a C library that implements cryptographic primitives, X.509 certificate manipulation and the SSL/TLS and DTLS protocols. Its small code footprint makes it suitable for embedded systems.") |
| 9 | set(PKGCONFIG_PROJECT_HOMEPAGE_URL "https://www.trustedfirmware.org/projects/mbed-tls/") |
| 10 | |
| 11 | # Following the conventsion for DESCRIPTION and HOMEPAGE_URL, VERSION wasn't added until 3.0 and depends on policy CMP0048 |
Manuel Pégourié-Gonnard | 9f7cc4c | 2024-08-26 12:44:41 +0200 | [diff] [blame] | 12 | set(PKGCONFIG_VERSION 2.28.9) |
Bill Roberts | 202a163 | 2024-01-09 13:10:05 -0600 | [diff] [blame] | 13 | |
| 14 | configure_file(mbedcrypto.pc.in mbedcrypto.pc @ONLY) |
| 15 | install(FILES |
| 16 | ${CMAKE_CURRENT_BINARY_DIR}/mbedcrypto.pc |
| 17 | DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) |
| 18 | |
| 19 | configure_file(mbedtls.pc.in mbedtls.pc @ONLY) |
| 20 | install(FILES |
| 21 | ${CMAKE_CURRENT_BINARY_DIR}/mbedtls.pc |
| 22 | DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) |
| 23 | |
| 24 | configure_file(mbedx509.pc.in mbedx509.pc @ONLY) |
| 25 | install(FILES |
| 26 | ${CMAKE_CURRENT_BINARY_DIR}/mbedx509.pc |
| 27 | DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) |
| 28 | endif() |