CMake: Use CMAKE_MODULE_PATH to locate nuvoton post build hook

We were previously relying on the global MBED_PATH variable to provide
the root for the include path to the post build hooks. We can't
guarantee that MBED_PATH will be set by any application building us, so
use CMAKE_MODULE_PATH (which we always set) like we do for the other
post-build hooks.
pull/14892/head
Robert Walton 2021-07-30 16:01:22 +01:00
parent 1dda219d3c
commit cfc68a0918
3 changed files with 3 additions and 3 deletions

View File

@ -25,7 +25,7 @@ project(mbed-os)
# Add all paths to the list files within Mbed OS
list(APPEND CMAKE_MODULE_PATH
"${mbed-os_SOURCE_DIR}/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_LATEST/scripts;${mbed-os_SOURCE_DIR}/targets/TARGET_Cypress/scripts;${mbed-os_SOURCE_DIR}/targets/TARGET_NXP/scripts"
"${mbed-os_SOURCE_DIR}/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_LATEST/scripts;${mbed-os_SOURCE_DIR}/targets/TARGET_Cypress/scripts;${mbed-os_SOURCE_DIR}/targets/TARGET_NXP/scripts;${mbed-os_SOURCE_DIR}/targets/TARGET_NUVOTON/scripts/"
)
add_subdirectory(extern)

View File

@ -1,7 +1,7 @@
# Copyright (c) 2020-2021 ARM Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
include(${MBED_PATH}/targets/TARGET_NUVOTON/scripts/mbed_set_post_build_nuvoton.cmake)
include(mbed_set_post_build_nuvoton)
target_link_libraries(mbed-m2354-tfm
INTERFACE

View File

@ -1,7 +1,7 @@
# Copyright (c) 2021 ARM Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
include(${MBED_PATH}/tools/cmake/mbed_set_post_build.cmake)
include(mbed_set_post_build)
#
# Sign TF-M secure and non-secure images and combine them with the bootloader