From 93e511d8a1de1c4d3387865734d0ab4dd72ac274 Mon Sep 17 00:00:00 2001 From: Robert Walton Date: Tue, 20 Jul 2021 11:58:53 +0100 Subject: [PATCH] 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. --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a27d2c7..1d23922 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,14 +9,14 @@ set(APP_TARGET mbed-os-example-crash-reporting) include(${MBED_PATH}/tools/cmake/app.cmake) +project(${APP_TARGET}) + add_subdirectory(${MBED_PATH}) add_executable(${APP_TARGET}) mbed_configure_app_target(${APP_TARGET}) -project(${APP_TARGET}) - target_sources(${APP_TARGET} PRIVATE main.cpp