-
Notifications
You must be signed in to change notification settings - Fork 95
/
define.txt
64 lines (48 loc) · 2.39 KB
/
define.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
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
cmake_policy(SET CMP0005 OLD) # definitions escaped explicitly (default)
cmake_policy(SET CMP0011 OLD) # policy flow old way (default)
if (NOT (${OS_BRAND} MATCHES "Linux"))
message(FATAL_ERROR "define.txt to be used only with Linux builds.")
endif()
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../)
add_definitions(-DMBED_CLOUD_CLIENT_USER_CONFIG_FILE="\\"mbed_cloud_client_user_config.h"\\")
add_definitions(-DPAL_USER_DEFINED_CONFIGURATION="\\"sotp_fs_config_linux.h"\\")
add_definitions(-DTARGET_LIKE_POSIX)
if(RESET_STORAGE)
add_definitions(-DRESET_STORAGE)
endif(RESET_STORAGE)
SET(PAL_TLS_BSP_DIR ${NEW_CMAKE_SOURCE_DIR}/mbed-cloud-client/mbed-client-pal/Configs/${TLS_LIBRARY})
if (${TLS_LIBRARY} MATCHES mbedTLS)
# PAL specific configurations for mbedTLS
add_definitions(-DMBEDTLS_CONFIG_FILE="\\"${PAL_TLS_BSP_DIR}/mbedTLSConfig_${OS_BRAND}.h"\\")
message("PAL_TLS_BSP_DIR ${PAL_TLS_BSP_DIR}/pal_${OS_BRAND}.h")
endif()
if(PAL_SIMULATOR_FILE_SYSTEM_OVER_RAM)
message(WARNING "You are using simulation of File System over RAM")
add_definitions(-DPAL_SIMULATOR_FILE_SYSTEM_OVER_RAM=${PAL_SIMULATOR_FILE_SYSTEM_OVER_RAM})
endif(PAL_SIMULATOR_FILE_SYSTEM_OVER_RAM)
add_definitions(-DPAL_DTLS_PEER_MIN_TIMEOUT=5000)
# enable fota
add_definitions(-DMBED_CLOUD_CLIENT_FOTA_ENABLE=1)
add_definitions(-DMBED_CLOUD_CLIENT_FOTA_LINUX_SINGLE_MAIN_FILE=1)
# Set to 1 to enable tracing
add_definitions(-DMBED_CONF_MBED_TRACE_ENABLE=0)
add_definitions(-DMBED_CONF_APP_DEVELOPER_MODE=1)
add_definitions(-DPLATFORM_ENABLE_BUTTON=1)
add_definitions(-DPLATFORM_ENABLE_LED=1)
# This definition controls application automatic reboot if network errors exceed certain limit.
# Disabled when set to 0.
add_definitions(-DMAX_ERROR_COUNT=0)
if(ENABLE_DEVICE_SENTRY)
add_definitions(-DMBED_CONF_MBED_CLOUD_CLIENT_ENABLE_DEVICE_SENTRY)
message("Enable Device Sentry feature")
add_definitions(-DMBED_CONF_APP_ENABLE_DS_CUSTOM_METRICS_EXAMPLE)
message("Enable Device Sentry example application")
endif(ENABLE_DEVICE_SENTRY)
# Enable FOTA Update
option(FOTA_ENABLE "Enable FOTA client module" ON)
add_definitions(-DFOTA_DEFAULT_APP_IFS=1)
add_definitions(-DTARGET_LIKE_LINUX=1)
add_definitions(-DFOTA_CUSTOM_PLATFORM=1)
add_definitions(-DMBED_CLOUD_CLIENT_FOTA_SUB_COMPONENT_SUPPORT=1)
# curl fix - https://github.com/curl/curl/issues/7988
set (CURL_USE_OPENSSL OFF CACHE BOOL "disable openssl" FORCE)