CMake: Use generated source files from parent
When building as a submodule of a parent project, like Mbed TLS, use the parent projects generated source files (error.c, version.c, version_features.c)
This commit is contained in:
parent
92da0bd862
commit
18d4789947
1 changed files with 18 additions and 3 deletions
|
@ -29,7 +29,6 @@ set(src_crypto
|
|||
ecp_curves.c
|
||||
entropy.c
|
||||
entropy_poll.c
|
||||
error.c
|
||||
gcm.c
|
||||
havege.c
|
||||
hkdf.c
|
||||
|
@ -65,11 +64,27 @@ set(src_crypto
|
|||
sha512.c
|
||||
threading.c
|
||||
timing.c
|
||||
version.c
|
||||
version_features.c
|
||||
xtea.c
|
||||
)
|
||||
|
||||
# For files generated by the parent project (Mbed TLS) when building Mbed
|
||||
# Crypto as a submodule, ensure that the parent project instance is used.
|
||||
if(USE_CRYPTO_SUBMODULE)
|
||||
set(src_crypto
|
||||
${src_crypto}
|
||||
${CMAKE_SOURCE_DIR}/library/version.c
|
||||
${CMAKE_SOURCE_DIR}/library/version_features.c
|
||||
${CMAKE_SOURCE_DIR}/library/error.c
|
||||
)
|
||||
else()
|
||||
set(src_crypto
|
||||
${src_crypto}
|
||||
version.c
|
||||
version_features.c
|
||||
error.c
|
||||
)
|
||||
endif()
|
||||
|
||||
set(src_x509
|
||||
certs.c
|
||||
pkcs11.c
|
||||
|
|
Loading…
Reference in a new issue