Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crypto: Move nrf_oberon base library out of BUILD_WITH_TFM filter #1520

Merged
merged 1 commit into from
Oct 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 14 additions & 13 deletions crypto/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,20 @@ if(CONFIG_NRF_OBERON OR CONFIG_BUILD_WITH_TFM OR CONFIG_OBERON_BACKEND OR CONFIG
"(${OBERON_LIB} or ${OBERON_MBEDTLS_LIB} doesn't exist.)")
endif()

#
# Add mbedcrypto_oberon_imported - Contains proprietary nrf_oberon APIs
#
add_library(mbedcrypto_oberon_imported STATIC IMPORTED GLOBAL)
set_target_properties(mbedcrypto_oberon_imported PROPERTIES
IMPORTED_LOCATION
"${OBERON_LIB}"
)
target_include_directories(mbedcrypto_oberon_imported
INTERFACE
"${OBERON_BASE}/include"
)


if (NOT CONFIG_BUILD_WITH_TFM AND NOT CONFIG_OBERON_BACKEND AND NOT CONFIG_PSA_CRYPTO_DRIVER_OBERON)
target_include_directories(nrfxlib_crypto INTERFACE ${OBERON_BASE}/include)
target_link_libraries(nrfxlib_crypto INTERFACE ${OBERON_LIB})
Expand All @@ -40,19 +54,6 @@ if(CONFIG_NRF_OBERON OR CONFIG_BUILD_WITH_TFM OR CONFIG_OBERON_BACKEND OR CONFIG
"(${OBERON_MBEDTLS_LIB} doesn't exist.)")
endif()

#
# Add mbedcrypto_oberon_imported - Contains proprietary nrf_oberon APIs
#
add_library(mbedcrypto_oberon_imported STATIC IMPORTED GLOBAL)
set_target_properties(mbedcrypto_oberon_imported PROPERTIES
IMPORTED_LOCATION
"${OBERON_LIB}"
)
target_include_directories(mbedcrypto_oberon_imported
INTERFACE
"${OBERON_BASE}/include"
)

#
# Add mbedcrypto_oberon_mbedtls_imported - contains legacy crypto APIs
#
Expand Down
Loading