forked from mbed-ce/mbed-ce-hello-world
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
24 lines (17 loc) · 1023 Bytes
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#
# Mbed CE Hello World Project
#
cmake_minimum_required(VERSION 3.19)
cmake_policy(VERSION 3.19)
# Initialize Mbed OS build system.
# Note: This block must be before the project() call.
set(MBED_APP_JSON_PATH mbed_app.json5)
# set(CUSTOM_TARGETS_JSON_PATH custom_targets.json) # If you need a custom target, use this line to specify the custom_targets.json
include(mbed-os/tools/cmake/app.cmake) # Load Mbed CE toolchain file and basic build system
# If you need any custom upload method configuration for your target, do that here
add_subdirectory(mbed-os) # Load Mbed OS build targets. Must be added before any other subdirectories
project(MbedCEHelloWorld) # TODO: change this to your project name
add_executable(HelloWorld main.cpp)
target_link_libraries(HelloWorld mbed-os) # Can also link to mbed-baremetal here
mbed_set_post_build(HelloWorld) # Must call this for each target to set up bin file creation, code upload, etc
mbed_finalize_build() # Make sure this is the last line of the top-level buildscript