• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1if(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  configure_file(mbedcrypto.pc.in mbedcrypto.pc @ONLY)
12    install(FILES
13    ${CMAKE_CURRENT_BINARY_DIR}/mbedcrypto.pc
14    DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
15
16  configure_file(mbedtls.pc.in mbedtls.pc @ONLY)
17    install(FILES
18    ${CMAKE_CURRENT_BINARY_DIR}/mbedtls.pc
19    DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
20
21  configure_file(mbedx509.pc.in mbedx509.pc @ONLY)
22    install(FILES
23    ${CMAKE_CURRENT_BINARY_DIR}/mbedx509.pc
24    DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
25endif()
26