Skip to content

Commit 91e7f79

Browse files
authored
Merge pull request #79 from hugueskamba/hk_cmake_rename_targets
CMake: Use renamed Mbed CMake targets component
2 parents f67cd30 + e911ed1 commit 91e7f79

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

getting-started/CMakeLists.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ set(MBED_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/mbed-os CACHE INTERNAL "")
88
set(MBED_CONFIG_PATH ${CMAKE_CURRENT_SOURCE_DIR}/.mbedbuild CACHE INTERNAL "")
99
set(APP_TARGET getting-started)
1010

11+
include(${MBED_ROOT}/tools/cmake/app.cmake)
12+
1113
add_subdirectory(${MBED_ROOT})
1214

1315
add_executable(${APP_TARGET})
@@ -19,7 +21,7 @@ mbed_set_mbed_target_linker_script(${APP_TARGET})
1921
project(${APP_TARGET})
2022

2123
# Provide Mbed OS with the header file it needs to configure Mbed TLS
22-
target_include_directories(mbed-os
24+
target_include_directories(${APP_TARGET}
2325
PUBLIC
2426
${CMAKE_CURRENT_SOURCE_DIR}
2527
)
@@ -30,8 +32,9 @@ target_sources(${APP_TARGET}
3032
)
3133

3234
target_link_libraries(${APP_TARGET}
33-
mbed-os
34-
mbed-os-psa
35+
PRIVATE
36+
mbed-os
37+
mbed-psa
3538
)
3639

3740
mbed_generate_bin_hex(${APP_TARGET})

0 commit comments

Comments
 (0)