Fix Cmake build: added src/store_sbrk.c and fixed target dependencies

pull/725/head
Daniele Lacamera 2026-03-16 10:29:59 +01:00
parent ea3e1db808
commit 0d56a02cbd
2 changed files with 6 additions and 1 deletions

View File

@ -557,6 +557,11 @@ set(WOLFBOOT_SOURCES "include/loader.h"
"src/image.c"
"src/loader.c")
if((DEFINED WOLFCRYPT_TZ_PKCS11 AND NOT WOLFCRYPT_TZ_PKCS11 STREQUAL "0") OR
(DEFINED WOLFCRYPT_TZ_PSA AND NOT WOLFCRYPT_TZ_PSA STREQUAL "0"))
list(APPEND WOLFBOOT_SOURCES "src/store_sbrk.c")
endif()
if(DEFINED WOLFCRYPT_TZ_PSA AND NOT WOLFCRYPT_TZ_PSA STREQUAL "0")
list(APPEND WOLFBOOT_SOURCES "src/dice/dice.c")
endif()

View File

@ -219,7 +219,7 @@ target_link_libraries(wolfcrypt target user_settings)
target_compile_definitions(
wolfcrypt
PUBLIC WOLFSSL_USER_SETTINGS
PRIVATE ${WOLFCRYPT_DEFS} ${SIGN_OPTIONS})
PRIVATE ${WOLFCRYPT_DEFS} ${SIGN_OPTIONS} ${WOLFBOOT_DEFS})
if(WOLFBOOT_SMALL_STACK)
target_compile_definitions(wolfcrypt PRIVATE WOLFBOOT_SMALL_STACK XMALLOC_USER)