Skip to content

Commit bf447ae

Browse files
committed
CMake: Make the application the top level CMake project
So CMake can work correctly we need to define our project before we add dependencies, otherwise the project we depend on will be registered as the current project.
1 parent 276ab76 commit bf447ae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ set(APP_TARGET mbed-os-example-cellular)
99

1010
include(${MBED_PATH}/tools/cmake/app.cmake)
1111

12+
project(${APP_TARGET})
13+
1214
add_subdirectory(${MBED_PATH})
1315

1416
add_executable(${APP_TARGET})
1517

1618
mbed_configure_app_target(${APP_TARGET})
1719

18-
project(${APP_TARGET})
19-
2020
target_include_directories(${APP_TARGET}
2121
PUBLIC
2222
${CMAKE_CURRENT_SOURCE_DIR}/include

0 commit comments

Comments
 (0)