Skip to content

Commit 55ff794

Browse files
0xc0170hugueskambarajkan01
authored
Add CMakelists (#52)
Add CMakelists Co-authored-by: Hugues Kamba <[email protected]> Co-authored-by: Hugues Kamba <[email protected]> Co-authored-by: Rajkumar Kanagaraj <[email protected]>
1 parent 985fbed commit 55ff794

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

CMakeLists.txt

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Copyright (c) 2020 ARM Limited. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
cmake_minimum_required(VERSION 3.19.0 FATAL_ERROR)
5+
6+
set(MBED_PATH ${CMAKE_CURRENT_SOURCE_DIR}/mbed-os CACHE INTERNAL "")
7+
set(MBED_CONFIG_PATH ${CMAKE_CURRENT_SOURCE_DIR}/.mbedbuild CACHE INTERNAL "")
8+
set(APP_TARGET mbed-os-example-devicekey)
9+
10+
include(${MBED_PATH}/tools/cmake/app.cmake)
11+
12+
add_subdirectory(${MBED_PATH})
13+
14+
add_executable(${APP_TARGET})
15+
16+
mbed_configure_app_target(${APP_TARGET})
17+
18+
mbed_set_mbed_target_linker_script(${APP_TARGET})
19+
20+
project(${APP_TARGET})
21+
22+
target_sources(${APP_TARGET}
23+
PRIVATE
24+
main.cpp
25+
)
26+
27+
target_link_libraries(${APP_TARGET}
28+
PRIVATE
29+
mbed-os
30+
mbed-storage-qspif
31+
mbed-device_key
32+
mbed-mbedtls
33+
)
34+
35+
mbed_set_post_build(${APP_TARGET})
36+
37+
option(VERBOSE_BUILD "Have a verbose build process")
38+
if(VERBOSE_BUILD)
39+
set(CMAKE_VERBOSE_MAKEFILE ON)
40+
endif()

0 commit comments

Comments
 (0)