1a8e1175bSopenharmony_ciif(NOT DISABLE_PACKAGE_CONFIG_AND_INSTALL) 2a8e1175bSopenharmony_ci include(JoinPaths.cmake) 3a8e1175bSopenharmony_ci join_paths(PKGCONFIG_INCLUDEDIR "\${prefix}" "${CMAKE_INSTALL_INCLUDEDIR}") 4a8e1175bSopenharmony_ci join_paths(PKGCONFIG_LIBDIR "\${prefix}" "${CMAKE_INSTALL_LIBDIR}") 5a8e1175bSopenharmony_ci 6a8e1175bSopenharmony_ci #define these manually since minimum CMAKE version is not 3.9 for DESCRIPTION and 3.12 for HOMEPAGE_URL usage in project() below. 7a8e1175bSopenharmony_ci # Prefix with something that won't clash with newer versions of CMAKE. 8a8e1175bSopenharmony_ci 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.") 9a8e1175bSopenharmony_ci set(PKGCONFIG_PROJECT_HOMEPAGE_URL "https://www.trustedfirmware.org/projects/mbed-tls/") 10a8e1175bSopenharmony_ci 11a8e1175bSopenharmony_ci configure_file(mbedcrypto.pc.in mbedcrypto.pc @ONLY) 12a8e1175bSopenharmony_ci install(FILES 13a8e1175bSopenharmony_ci ${CMAKE_CURRENT_BINARY_DIR}/mbedcrypto.pc 14a8e1175bSopenharmony_ci DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) 15a8e1175bSopenharmony_ci 16a8e1175bSopenharmony_ci configure_file(mbedtls.pc.in mbedtls.pc @ONLY) 17a8e1175bSopenharmony_ci install(FILES 18a8e1175bSopenharmony_ci ${CMAKE_CURRENT_BINARY_DIR}/mbedtls.pc 19a8e1175bSopenharmony_ci DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) 20a8e1175bSopenharmony_ci 21a8e1175bSopenharmony_ci configure_file(mbedx509.pc.in mbedx509.pc @ONLY) 22a8e1175bSopenharmony_ci install(FILES 23a8e1175bSopenharmony_ci ${CMAKE_CURRENT_BINARY_DIR}/mbedx509.pc 24a8e1175bSopenharmony_ci DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) 25a8e1175bSopenharmony_ciendif() 26