Skip to content

Commit 9ef0655

Browse files
authored
Merge pull request #164 from hugueskamba/hk_cmake_rename_targets
CMake: Use renamed Mbed CMake targets component
2 parents ce0ffdd + c9fcc40 commit 9ef0655

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

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 mbed-os-example-sockets)
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 for LoRa
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-netsocket
35+
PRIVATE
36+
mbed-os
37+
mbed-netsocket
3538
)
3639

3740
mbed_generate_bin_hex(${APP_TARGET})

0 commit comments

Comments
 (0)