Skip to content

Commit d763955

Browse files
committed
CMake: set CMAKE_MODULE_PATH in the Mbed OS CMakelists.txt
Update CMAKE_MODULE_PATH at once place. Note, we update also CMAKE_MODULE_PATH in app.cmake. This is temporary until we get a proper way to include Mbed Os (removing app.cmake need to be included by an application).
1 parent 424487d commit d763955

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ include(mbed_set_linker_script)
1010

1111
project(mbed-os)
1212

13+
# Add all paths to the list files within Mbed OS
14+
list(APPEND CMAKE_MODULE_PATH
15+
"${PROJECT_SOURCE_DIR}/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_LATEST/scripts;${PROJECT_SOURCE_DIR}/targets/TARGET_Cypress/scripts;${PROJECT_SOURCE_DIR}/targets/TARGET_NXP/scripts"
16+
)
17+
1318
add_library(mbed-core INTERFACE)
1419

1520
add_library(mbed-os INTERFACE)

platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_LATEST/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,3 @@ target_sources(mbed-psa
4040
src/tfm_ps_ipc_api.c
4141
)
4242

43-
set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${CMAKE_CURRENT_SOURCE_DIR}/scripts")

targets/TARGET_Cypress/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# Copyright (c) 2020-2021 ARM Limited. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0
33

4-
set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${CMAKE_CURRENT_SOURCE_DIR}/scripts")
5-
64
add_subdirectory(TARGET_PSOC6 EXCLUDE_FROM_ALL)
75

86
add_library(mbed-cy-external-wifi-fw INTERFACE)

targets/TARGET_NXP/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# Copyright (c) 2020-2021 ARM Limited. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0
33

4-
set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${CMAKE_CURRENT_SOURCE_DIR}/scripts")
5-
64
add_subdirectory(TARGET_LPC11XX_11CXX EXCLUDE_FROM_ALL)
75
add_subdirectory(TARGET_LPC176X EXCLUDE_FROM_ALL)
86
add_subdirectory(TARGET_MCUXpresso_MCUS EXCLUDE_FROM_ALL)

tools/cmake/app.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# SPDX-License-Identifier: Apache-2.0
33

44
# Add our CMake list files to CMake default module path
5-
set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${CMAKE_CURRENT_LIST_DIR}")
5+
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
66

77
find_program(CCACHE "ccache")
88
if(CCACHE)

0 commit comments

Comments
 (0)