forked from aws/ota-for-aws-iot-embedded-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
otaFilePaths.cmake
94 lines (83 loc) · 3.48 KB
/
otaFilePaths.cmake
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# This file is to add source files and include directories
# into variables so that it can be reused from different repositories
# in their Cmake based build system by including this file.
#
# Files specific to the repository such as test runner, platform tests
# are not added to the variables.
# 3rdparty source files.
include( ${CMAKE_CURRENT_LIST_DIR}/source/dependency/coreJSON/jsonFilePaths.cmake )
set( TINYCBOR_SOURCES
"${CMAKE_CURRENT_LIST_DIR}/source/dependency/3rdparty/tinycbor/src/cborpretty.c"
"${CMAKE_CURRENT_LIST_DIR}/source/dependency/3rdparty/tinycbor/src/cborpretty_stdio.c"
"${CMAKE_CURRENT_LIST_DIR}/source/dependency/3rdparty/tinycbor/src/cborencoder.c"
"${CMAKE_CURRENT_LIST_DIR}/source/dependency/3rdparty/tinycbor/src/cborencoder_close_container_checked.c"
"${CMAKE_CURRENT_LIST_DIR}/source/dependency/3rdparty/tinycbor/src/cborerrorstrings.c"
"${CMAKE_CURRENT_LIST_DIR}/source/dependency/3rdparty/tinycbor/src/cborparser.c"
"${CMAKE_CURRENT_LIST_DIR}/source/dependency/3rdparty/tinycbor/src/cborparser_dup_string.c"
)
set(TINYCBOR_INCLUDE_DIRS
"${CMAKE_CURRENT_LIST_DIR}/source/dependency/3rdparty/tinycbor/src"
)
# Use C99 for tinycbor as it is incompatible with C90
if(CMAKE_C_STANDARD LESS 99)
set_source_files_properties(
${TINYCBOR_SOURCES}
PROPERTIES
COMPILE_FLAGS "-std=gnu99"
)
endif()
# OTA library source files, including 3rdparties.
set( OTA_SOURCES
"${CMAKE_CURRENT_LIST_DIR}/source/include/ota.h"
"${CMAKE_CURRENT_LIST_DIR}/source/include/ota_os_interface.h"
"${CMAKE_CURRENT_LIST_DIR}/source/include/ota_platform_interface.h"
"${CMAKE_CURRENT_LIST_DIR}/source/include/ota_private.h"
"${CMAKE_CURRENT_LIST_DIR}/source/include/ota_interface_private.h"
"${CMAKE_CURRENT_LIST_DIR}/source/include/ota_base64_private.h"
"${CMAKE_CURRENT_LIST_DIR}/source/ota.c"
"${CMAKE_CURRENT_LIST_DIR}/source/ota_interface.c"
"${CMAKE_CURRENT_LIST_DIR}/source/ota_base64.c"
${JSON_SOURCES}
${TINYCBOR_SOURCES}
)
# OTA library public include directories.
set( OTA_INCLUDE_PUBLIC_DIRS
"${CMAKE_CURRENT_LIST_DIR}/source/include"
"${CMAKE_CURRENT_LIST_DIR}/source/portable"
)
# OTA library private include directories.
set( OTA_INCLUDE_PRIVATE_DIRS
"${CMAKE_CURRENT_LIST_DIR}/source"
${JSON_INCLUDE_PUBLIC_DIRS}
${TINYCBOR_INCLUDE_DIRS}
)
# OTA library POSIX OS porting source files.
# Note: user needs to call find_library(LIB_RT rt REQUIRED) and link with
# ${LIB_RT} because librt is required to use OTA OS POSIX port.
set( OTA_OS_POSIX_SOURCES
"${CMAKE_CURRENT_LIST_DIR}/source/portable/os/ota_os_posix.c"
)
# OTA library POSIX OS porting source files.
set( OTA_INCLUDE_OS_POSIX_DIRS
"${CMAKE_CURRENT_LIST_DIR}/source/portable/os"
)
# OTA library FreeRTOS OS porting source files.
set( OTA_OS_FREERTOS_SOURCES
"${CMAKE_CURRENT_LIST_DIR}/source/portable/os/ota_os_freertos.c"
)
# OTA library FreeRTOS OS porting source files.
set( OTA_INCLUDE_OS_FREERTOS_DIRS
"${CMAKE_CURRENT_LIST_DIR}/source/portable/os"
)
# OTA library MQTT backend source files.
set( OTA_MQTT_SOURCES
"${CMAKE_CURRENT_LIST_DIR}/source/ota_mqtt.c"
"${CMAKE_CURRENT_LIST_DIR}/source/ota_cbor.c"
"${CMAKE_CURRENT_LIST_DIR}/source/include/ota_mqtt_private.h"
"${CMAKE_CURRENT_LIST_DIR}/source/include/ota_cbor_private.h"
)
# OTA library HTTP backend source files.
set( OTA_HTTP_SOURCES
"${CMAKE_CURRENT_LIST_DIR}/source/ota_http.c"
"${CMAKE_CURRENT_LIST_DIR}/source/include/ota_http_private.h"
)