forked from eclipse-threadx/getting-started
-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
32 lines (24 loc) · 974 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
25
26
27
28
29
30
31
32
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
cmake_minimum_required(VERSION 3.13 FATAL_ERROR)
set(CMAKE_C_STANDARD 99)
set(GSG_BASE_DIR ${CMAKE_SOURCE_DIR}/../..)
set(SHARED_SRC_DIR ${GSG_BASE_DIR}/shared/src)
set(SHARED_LIB_DIR ${GSG_BASE_DIR}/shared/lib)
# use the repo version of ninja on Windows as there is no Ninja installer
if(WIN32)
set(CMAKE_MAKE_PROGRAM ${GSG_BASE_DIR}/cmake/ninja CACHE STRING "Ninja location")
endif()
# Set the toolchain if not defined
if(NOT CMAKE_TOOLCHAIN_FILE)
set(CMAKE_TOOLCHAIN_FILE "${GSG_BASE_DIR}/cmake/arm-gcc-cortex-m4.cmake")
endif()
include(${GSG_BASE_DIR}/cmake/utilities.cmake)
# Define the Project
# CXX enables IntelliSense only. Sources are still compiled as C.
project(stm32l4s5_azure_iot C CXX ASM)
# Disable common networking component, STM has it's own
set(DISABLE_COMMON_NETWORK true)
add_subdirectory(${SHARED_SRC_DIR} shared_src)
add_subdirectory(lib)
add_subdirectory(app)