diff --git a/modules/trusted-firmware-m/CMakeLists.txt b/modules/trusted-firmware-m/CMakeLists.txt index 6723e1b5c2b..f0f28ec212b 100644 --- a/modules/trusted-firmware-m/CMakeLists.txt +++ b/modules/trusted-firmware-m/CMakeLists.txt @@ -321,7 +321,7 @@ if (CONFIG_BUILD_WITH_TFM) ) target_include_directories(tfm_api PRIVATE - ${ZEPHYR_TRUSTED_FIRMWARE_M_MODULE_DIR}/interface/include + ${TFM_BINARY_DIR}/install/interface/include ) zephyr_library_link_libraries( diff --git a/samples/tfm_integration/psa_crypto/CMakeLists.txt b/samples/tfm_integration/psa_crypto/CMakeLists.txt index b4461a027de..17339b470b8 100644 --- a/samples/tfm_integration/psa_crypto/CMakeLists.txt +++ b/samples/tfm_integration/psa_crypto/CMakeLists.txt @@ -16,7 +16,7 @@ target_sources(app PRIVATE src/util_app_log.c) target_sources(app PRIVATE src/util_sformat.c) target_include_directories(app PRIVATE - ${ZEPHYR_TRUSTED_FIRMWARE_M_MODULE_DIR}/interface/include + $/install/interface/include ) # In TF-M, default value of CRYPTO_ENGINE_BUF_SIZE is 0x2080. It causes diff --git a/samples/tfm_integration/psa_protected_storage/CMakeLists.txt b/samples/tfm_integration/psa_protected_storage/CMakeLists.txt index 40bfae3263a..bbb8a2041fd 100644 --- a/samples/tfm_integration/psa_protected_storage/CMakeLists.txt +++ b/samples/tfm_integration/psa_protected_storage/CMakeLists.txt @@ -13,5 +13,5 @@ project(protected_storage) target_sources(app PRIVATE src/main.c) target_include_directories(app PRIVATE - ${ZEPHYR_TRUSTED_FIRMWARE_M_MODULE_DIR}/interface/include + $/install/interface/include ) diff --git a/samples/tfm_integration/tfm_ipc/CMakeLists.txt b/samples/tfm_integration/tfm_ipc/CMakeLists.txt index 0ac1e79b48f..f11b67af843 100644 --- a/samples/tfm_integration/tfm_ipc/CMakeLists.txt +++ b/samples/tfm_integration/tfm_ipc/CMakeLists.txt @@ -9,5 +9,5 @@ project(tfm_ipc) target_sources(app PRIVATE src/main.c) target_include_directories(app PRIVATE - ${ZEPHYR_TRUSTED_FIRMWARE_M_MODULE_DIR}/interface/include + $/install/interface/include ) diff --git a/samples/tfm_integration/tfm_psa_test/CMakeLists.txt b/samples/tfm_integration/tfm_psa_test/CMakeLists.txt index 080bfeb0231..9dcbf12ae64 100644 --- a/samples/tfm_integration/tfm_psa_test/CMakeLists.txt +++ b/samples/tfm_integration/tfm_psa_test/CMakeLists.txt @@ -13,5 +13,5 @@ project(tfm_psa_storage_test) target_sources(app PRIVATE src/main.c) target_include_directories(app PRIVATE - ${ZEPHYR_TRUSTED_FIRMWARE_M_MODULE_DIR}/interface/include + $/install/interface/include ) diff --git a/samples/tfm_integration/tfm_secure_partition/CMakeLists.txt b/samples/tfm_integration/tfm_secure_partition/CMakeLists.txt index 636ba5f1c19..262ac042c74 100644 --- a/samples/tfm_integration/tfm_secure_partition/CMakeLists.txt +++ b/samples/tfm_integration/tfm_secure_partition/CMakeLists.txt @@ -28,7 +28,7 @@ target_sources(app PRIVATE ) target_include_directories(app PRIVATE - ${ZEPHYR_TRUSTED_FIRMWARE_M_MODULE_DIR}/interface/include + $/install/interface/include ) target_compile_definitions(app diff --git a/tests/arch/arm/arm_thread_swap_tz/CMakeLists.txt b/tests/arch/arm/arm_thread_swap_tz/CMakeLists.txt index 56231233c97..93e91deafcb 100644 --- a/tests/arch/arm/arm_thread_swap_tz/CMakeLists.txt +++ b/tests/arch/arm/arm_thread_swap_tz/CMakeLists.txt @@ -12,6 +12,8 @@ project(NONE) FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) -target_include_directories(app PRIVATE - ${ZEPHYR_TRUSTED_FIRMWARE_M_MODULE_DIR}/interface/include -) +if (CONFIG_BUILD_WITH_TFM) + target_include_directories(app PRIVATE + $/install/interface/include + ) +endif()