cmake: Fix library order

A library that depends on another one should come first
in the list of libraries to link against.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
This commit is contained in:
Ronald Cron 2025-06-16 16:55:15 +02:00
parent a3b562aa17
commit d1e4ccf0a0
4 changed files with 5 additions and 5 deletions

View File

@ -35,4 +35,4 @@ find_package(MbedTLS REQUIRED)
add_executable(cmake_package cmake_package.c)
target_link_libraries(cmake_package
MbedTLS::tfpsacrypto MbedTLS::mbedtls MbedTLS::mbedx509)
MbedTLS::mbedtls MbedTLS::mbedx509 MbedTLS::tfpsacrypto)

View File

@ -38,4 +38,4 @@ find_package(MbedTLS REQUIRED)
add_executable(cmake_package_install cmake_package_install.c)
target_link_libraries(cmake_package_install
MbedTLS::tfpsacrypto MbedTLS::mbedtls MbedTLS::mbedx509)
MbedTLS::mbedtls MbedTLS::mbedx509 MbedTLS::tfpsacrypto)

View File

@ -14,9 +14,9 @@ add_subdirectory(${MBEDTLS_DIR} build)
# Link against all the Mbed TLS libraries. Verifies that the targets have been
# created using the specified prefix
set(libs
subproject_test_tfpsacrypto
subproject_test_mbedx509
subproject_test_mbedtls
subproject_test_mbedx509
subproject_test_tfpsacrypto
)
add_executable(cmake_subproject cmake_subproject.c)

View File

@ -1,6 +1,6 @@
set(libs
${tfpsacrypto_target}
${mbedx509_target}
${tfpsacrypto_target}
)
set(executables