1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-29 11:41:15 +03:00

tf-psa-crypto: Add cmake_package test program

We cannot add the equivalent of
cmake_package_install yet as the build in
tf-psa-crypto still references some headers
in ./include/mbedtls like mbedtls_config.h.

We cannot add the equivalent of
cmake_subproject yet as currently only
the case of the Mbed TLS parent project is
supported.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
This commit is contained in:
Ronald Cron
2024-10-17 17:50:32 +02:00
parent 4870e613f8
commit 4cd797e7fb
4 changed files with 78 additions and 0 deletions

View File

@ -143,6 +143,27 @@ component_test_cmake_as_package () {
fi
}
component_test_tf_psa_crypto_cmake_as_package () {
# Remove existing generated files so that we use the ones CMake
# generates
make neat
msg "build: cmake 'as-package' build"
root_dir="$(pwd)"
cd tf-psa-crypto/programs/test/cmake_package
build_variant_dir="$(pwd)"
cmake .
make
./cmake_package
if [[ "$OSTYPE" == linux* ]]; then
PKG_CONFIG_PATH="${build_variant_dir}/tf-psa-crypto/pkgconfig" \
${root_dir}/tests/scripts/pkgconfig.sh \
tfpsacrypto
# This is the EXPECTED package name. Renaming it could break consumers
# of pkg-config, consider carefully.
fi
}
support_test_cmake_as_package () {
support_test_cmake_out_of_source
}