Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: Adafruit_GFX TextLCD
Diff: CMakeLists.txt
- Revision:
- 0:9a306207c5b2
diff -r 000000000000 -r 9a306207c5b2 CMakeLists.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CMakeLists.txt Sun May 29 19:02:58 2022 -0400 @@ -0,0 +1,35 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +cmake_minimum_required(VERSION 3.19.0 FATAL_ERROR) + +set(MBED_PATH ${CMAKE_CURRENT_SOURCE_DIR}/mbed-os CACHE INTERNAL "") +set(MBED_CONFIG_PATH ${CMAKE_CURRENT_BINARY_DIR} CACHE INTERNAL "") +set(APP_TARGET mbed-os-example-blinky) + +include(${MBED_PATH}/tools/cmake/app.cmake) + +add_subdirectory(${MBED_PATH}) + +add_executable(${APP_TARGET}) + +mbed_configure_app_target(${APP_TARGET}) + +project(${APP_TARGET}) + +target_sources(${APP_TARGET} + PRIVATE + main.cpp +) + +target_link_libraries(${APP_TARGET} + PRIVATE + mbed-os +) + +mbed_set_post_build(${APP_TARGET}) + +option(VERBOSE_BUILD "Have a verbose build process") +if(VERBOSE_BUILD) + set(CMAKE_VERBOSE_MAKEFILE ON) +endif()