Skip to content

Commit a4ef9d2

Browse files
authored
Merge pull request #199 from hugueskamba/hk_cmake_rename_targets
CMake: Use renamed Mbed CMake targets component
2 parents 7bdbf58 + 0dda7e8 commit a4ef9d2

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

CMakeLists.txt

Lines changed: 7 additions & 4 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-lorawan)
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
)
@@ -31,9 +33,10 @@ target_sources(${APP_TARGET}
3133
)
3234

3335
target_link_libraries(${APP_TARGET}
34-
mbed-os
35-
mbed-os-lorawan
36-
mbed-os-mbedtls
36+
PRIVATE
37+
mbed-os
38+
mbed-lorawan
39+
mbed-mbedtls
3740
)
3841

3942
mbed_generate_bin_hex(${APP_TARGET})

0 commit comments

Comments
 (0)