Fix header file detection

Make the include directory check relative to the source file in case not called
from the project root.

Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
This commit is contained in:
Gabor Mezei 2024-09-09 17:00:50 +02:00
parent d53080da2a
commit 776ee9068d
No known key found for this signature in database
GPG Key ID: 6310BD29B0BFF98C

View File

@ -593,9 +593,11 @@ class CryptoConfigFile(ConfigFile):
# Temporary, while Mbed TLS does not just rely on the TF-PSA-Crypto
# build system to build its crypto library. When it does, the
# condition can just be removed.
_path_in_tree = 'include/psa/crypto_config.h' \
if os.path.isfile('include/psa/crypto_config.h') else \
'tf-psa-crypto/include/psa/crypto_config.h'
_path_in_tree = ('include/psa/crypto_config.h'
if not os.path.isdir(os.path.join(os.path.dirname(__file__),
os.pardir,
'tf-psa-crypto')) else
'tf-psa-crypto/include/psa/crypto_config.h')
default_path = [_path_in_tree,
os.path.join(os.path.dirname(__file__),
os.pardir,