This program collects raw time series data from the ADC using the NXP board that will later be post processed by PFP Cyber-security cloud base machine learning engine to determine the state of the device.
Dependencies: FXAS21002 FXOS8700Q
simple-mbed-cloud-client/mbed-cloud-client/CMakeLists.txt@0:977e87915078, 2019-08-28 (annotated)
- Committer:
- vithyat
- Date:
- Wed Aug 28 19:24:56 2019 +0000
- Revision:
- 0:977e87915078
init
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
vithyat | 0:977e87915078 | 1 | INCLUDE(CMakeForceCompiler) |
vithyat | 0:977e87915078 | 2 | # CROSS COMPILER SETTING |
vithyat | 0:977e87915078 | 3 | cmake_minimum_required (VERSION 3.5) |
vithyat | 0:977e87915078 | 4 | SET(CMAKE_SYSTEM_NAME Generic) |
vithyat | 0:977e87915078 | 5 | |
vithyat | 0:977e87915078 | 6 | add_definitions(-DTARGET_LIKE_POSIX) |
vithyat | 0:977e87915078 | 7 | |
vithyat | 0:977e87915078 | 8 | if (${OS_BRAND} MATCHES Linux) |
vithyat | 0:977e87915078 | 9 | add_definitions(-DMBED_CONF_NS_HAL_PAL_EVENT_LOOP_THREAD_STACK_SIZE=102400) |
vithyat | 0:977e87915078 | 10 | else() |
vithyat | 0:977e87915078 | 11 | add_definitions(-DMBED_CONF_NS_HAL_PAL_EVENT_LOOP_THREAD_STACK_SIZE=8000) |
vithyat | 0:977e87915078 | 12 | endif() |
vithyat | 0:977e87915078 | 13 | |
vithyat | 0:977e87915078 | 14 | |
vithyat | 0:977e87915078 | 15 | SET(MBED_CLOUD_CLIENT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/mbed-cloud-client) |
vithyat | 0:977e87915078 | 16 | |
vithyat | 0:977e87915078 | 17 | add_definitions(-DMBED_CONF_NANOSTACK_EVENTLOOP_EXCLUDE_HIGHRES_TIMER) |
vithyat | 0:977e87915078 | 18 | add_definitions(-DMBED_CONF_NANOSTACK_EVENTLOOP_USE_PLATFORM_TICK_TIMER) |
vithyat | 0:977e87915078 | 19 | |
vithyat | 0:977e87915078 | 20 | add_definitions(-DARM_UC_PROFILE_MBED_CLOUD_CLIENT=1) |
vithyat | 0:977e87915078 | 21 | add_definitions(-DARM_UC_FEATURE_PAL_FILESYSTEM=1) |
vithyat | 0:977e87915078 | 22 | |
vithyat | 0:977e87915078 | 23 | # enable duplicate detection by default, count is the same as resend queue size |
vithyat | 0:977e87915078 | 24 | add_definitions(-DMBED_CONF_MBED_CLIENT_SN_COAP_DUPLICATION_MAX_MSGS_COUNT=4) |
vithyat | 0:977e87915078 | 25 | |
vithyat | 0:977e87915078 | 26 | project(mbedCloudClient) |
vithyat | 0:977e87915078 | 27 | |
vithyat | 0:977e87915078 | 28 | # mbed-cloud-client |
vithyat | 0:977e87915078 | 29 | |
vithyat | 0:977e87915078 | 30 | ADD_GLOBALDIR( ${CMAKE_CURRENT_SOURCE_DIR}) |
vithyat | 0:977e87915078 | 31 | ADD_GLOBALDIR( ${CMAKE_CURRENT_SOURCE_DIR}/source) |
vithyat | 0:977e87915078 | 32 | ADD_GLOBALDIR( ${CMAKE_CURRENT_SOURCE_DIR}/source/include) |
vithyat | 0:977e87915078 | 33 | ADD_GLOBALDIR( ${CMAKE_CURRENT_SOURCE_DIR}/mbed-cloud-client) |
vithyat | 0:977e87915078 | 34 | ADD_GLOBALDIR( ${CMAKE_CURRENT_SOURCE_DIR}/mbed-client) |
vithyat | 0:977e87915078 | 35 | |
vithyat | 0:977e87915078 | 36 | # mbed-client |
vithyat | 0:977e87915078 | 37 | |
vithyat | 0:977e87915078 | 38 | SET(MBED_CLIENT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/mbed-client) |
vithyat | 0:977e87915078 | 39 | |
vithyat | 0:977e87915078 | 40 | ADD_GLOBALDIR(${MBED_CLIENT_SOURCE_DIR}) |
vithyat | 0:977e87915078 | 41 | ADD_GLOBALDIR(${MBED_CLIENT_SOURCE_DIR}/source) |
vithyat | 0:977e87915078 | 42 | ADD_GLOBALDIR(${MBED_CLIENT_SOURCE_DIR}/source/include) |
vithyat | 0:977e87915078 | 43 | ADD_GLOBALDIR(${MBED_CLIENT_SOURCE_DIR}/mbed-client) |
vithyat | 0:977e87915078 | 44 | ADD_GLOBALDIR(${MBED_CLIENT_SOURCE_DIR}/mbed-client-c) |
vithyat | 0:977e87915078 | 45 | ADD_GLOBALDIR(${MBED_CLIENT_SOURCE_DIR}/mbed-client-c/nsdl-c) |
vithyat | 0:977e87915078 | 46 | ADD_GLOBALDIR(${MBED_CLIENT_SOURCE_DIR}/mbed-client-c/source/include) |
vithyat | 0:977e87915078 | 47 | ADD_GLOBALDIR(${MBED_CLIENT_SOURCE_DIR}/mbed-client-classic) |
vithyat | 0:977e87915078 | 48 | ADD_GLOBALDIR(${MBED_CLIENT_SOURCE_DIR}/mbed-client-classic/mbed-client-classic) |
vithyat | 0:977e87915078 | 49 | ADD_GLOBALDIR(${MBED_CLIENT_SOURCE_DIR}/mbed-client-mbed-tls) |
vithyat | 0:977e87915078 | 50 | ADD_GLOBALDIR(${MBED_CLIENT_SOURCE_DIR}/mbed-client-mbed-tls/mbed-client-mbedtls) |
vithyat | 0:977e87915078 | 51 | |
vithyat | 0:977e87915078 | 52 | # pal headers |
vithyat | 0:977e87915078 | 53 | |
vithyat | 0:977e87915078 | 54 | SET(PAL_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/mbed-client-pal/Source) |
vithyat | 0:977e87915078 | 55 | ADD_GLOBALDIR(${PAL_SOURCE_DIR}/PAL-Impl/Services-API) |
vithyat | 0:977e87915078 | 56 | ADD_GLOBALDIR(${PAL_SOURCE_DIR}/Port/Platform-API) |
vithyat | 0:977e87915078 | 57 | |
vithyat | 0:977e87915078 | 58 | # common components |
vithyat | 0:977e87915078 | 59 | |
vithyat | 0:977e87915078 | 60 | ADD_GLOBALDIR(${CMAKE_CURRENT_SOURCE_DIR}/mbed-coap) |
vithyat | 0:977e87915078 | 61 | ADD_GLOBALDIR(${CMAKE_CURRENT_SOURCE_DIR}/mbed-coap/mbed-coap) |
vithyat | 0:977e87915078 | 62 | ADD_GLOBALDIR(${CMAKE_CURRENT_SOURCE_DIR}/mbed-coap/source/include) |
vithyat | 0:977e87915078 | 63 | ADD_GLOBALDIR(${CMAKE_CURRENT_SOURCE_DIR}/mbed-trace) |
vithyat | 0:977e87915078 | 64 | ADD_GLOBALDIR(${CMAKE_CURRENT_SOURCE_DIR}/mbed-trace/mbed-trace) |
vithyat | 0:977e87915078 | 65 | ADD_GLOBALDIR(${CMAKE_CURRENT_SOURCE_DIR}/mbed-client-randlib) |
vithyat | 0:977e87915078 | 66 | ADD_GLOBALDIR(${CMAKE_CURRENT_SOURCE_DIR}/mbed-client-randlib/mbed-client-randlib) |
vithyat | 0:977e87915078 | 67 | ADD_GLOBALDIR(${CMAKE_CURRENT_SOURCE_DIR}/mbed-client-randlib/mbed-client-randlib/platform) |
vithyat | 0:977e87915078 | 68 | ADD_GLOBALDIR(${CMAKE_CURRENT_SOURCE_DIR}/nanostack-libservice) |
vithyat | 0:977e87915078 | 69 | ADD_GLOBALDIR(${CMAKE_CURRENT_SOURCE_DIR}/nanostack-libservice/mbed-client-libservice) |
vithyat | 0:977e87915078 | 70 | ADD_GLOBALDIR(${CMAKE_CURRENT_SOURCE_DIR}/nanostack-libservice/mbed-client-libservice/platform) |
vithyat | 0:977e87915078 | 71 | ADD_GLOBALDIR(${CMAKE_CURRENT_SOURCE_DIR}/sal-stack-nanostack-eventloop) |
vithyat | 0:977e87915078 | 72 | ADD_GLOBALDIR(${CMAKE_CURRENT_SOURCE_DIR}/sal-stack-nanostack-eventloop/nanostack-event-loop) |
vithyat | 0:977e87915078 | 73 | ADD_GLOBALDIR(${CMAKE_CURRENT_SOURCE_DIR}/ns-hal-pal) |
vithyat | 0:977e87915078 | 74 | |
vithyat | 0:977e87915078 | 75 | # factory-client |
vithyat | 0:977e87915078 | 76 | |
vithyat | 0:977e87915078 | 77 | SET(FACTORY_CLIENT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/factory-configurator-client) |
vithyat | 0:977e87915078 | 78 | ADD_GLOBALDIR(${FACTORY_CLIENT_SOURCE_DIR}/factory-configurator-client) |
vithyat | 0:977e87915078 | 79 | |
vithyat | 0:977e87915078 | 80 | SET(FCC_MODULES |
vithyat | 0:977e87915078 | 81 | ftcd-comm-base |
vithyat | 0:977e87915078 | 82 | ftcd-comm-socket |
vithyat | 0:977e87915078 | 83 | crypto-service |
vithyat | 0:977e87915078 | 84 | key-config-manager |
vithyat | 0:977e87915078 | 85 | factory-configurator-client |
vithyat | 0:977e87915078 | 86 | fcc-bundle-handler |
vithyat | 0:977e87915078 | 87 | secsrv-cbor |
vithyat | 0:977e87915078 | 88 | logger |
vithyat | 0:977e87915078 | 89 | storage |
vithyat | 0:977e87915078 | 90 | utils |
vithyat | 0:977e87915078 | 91 | mbed-trace-helper |
vithyat | 0:977e87915078 | 92 | fcc-output-info-handler |
vithyat | 0:977e87915078 | 93 | mbed-client-esfs |
vithyat | 0:977e87915078 | 94 | ) |
vithyat | 0:977e87915078 | 95 | |
vithyat | 0:977e87915078 | 96 | # XXX: do NOT do this, no need to spam ~5KB of FCC include paths for each CC/CXX invocation. |
vithyat | 0:977e87915078 | 97 | # includes |
vithyat | 0:977e87915078 | 98 | #FOREACH(module ${FCC_MODULES}) |
vithyat | 0:977e87915078 | 99 | # ADD_GLOBALDIR(${FACTORY_CLIENT_SOURCE_DIR}/${module}/${module}) |
vithyat | 0:977e87915078 | 100 | # ADD_GLOBALDIR(${FACTORY_CLIENT_SOURCE_DIR}/${module}/source/include) |
vithyat | 0:977e87915078 | 101 | #ENDFOREACH() |
vithyat | 0:977e87915078 | 102 | |
vithyat | 0:977e87915078 | 103 | include_directories(${FACTORY_CLIENT_SOURCE_DIR}/factory-configurator-client/source/include) |
vithyat | 0:977e87915078 | 104 | include_directories(${FACTORY_CLIENT_SOURCE_DIR}/factory-configurator-client/factory-configurator-client) |
vithyat | 0:977e87915078 | 105 | include_directories(${FACTORY_CLIENT_SOURCE_DIR}/fc_protocol_handler/fc_protocol_handler) |
vithyat | 0:977e87915078 | 106 | include_directories(${FACTORY_CLIENT_SOURCE_DIR}/fc_protocol_handler/source/include) |
vithyat | 0:977e87915078 | 107 | include_directories(${FACTORY_CLIENT_SOURCE_DIR}/secure_store) |
vithyat | 0:977e87915078 | 108 | include_directories(${FACTORY_CLIENT_SOURCE_DIR}/secure_store/secure_store) |
vithyat | 0:977e87915078 | 109 | include_directories(${FACTORY_CLIENT_SOURCE_DIR}/storage) |
vithyat | 0:977e87915078 | 110 | include_directories(${FACTORY_CLIENT_SOURCE_DIR}/storage/storage) |
vithyat | 0:977e87915078 | 111 | include_directories(${FACTORY_CLIENT_SOURCE_DIR}/key-config-manager) |
vithyat | 0:977e87915078 | 112 | include_directories(${FACTORY_CLIENT_SOURCE_DIR}/key-config-manager/source/include) |
vithyat | 0:977e87915078 | 113 | include_directories(${FACTORY_CLIENT_SOURCE_DIR}/utils) |
vithyat | 0:977e87915078 | 114 | include_directories(${FACTORY_CLIENT_SOURCE_DIR}/utils/utils) |
vithyat | 0:977e87915078 | 115 | include_directories(${FACTORY_CLIENT_SOURCE_DIR}/logger) |
vithyat | 0:977e87915078 | 116 | include_directories(${FACTORY_CLIENT_SOURCE_DIR}/logger/logger) |
vithyat | 0:977e87915078 | 117 | include_directories(${FACTORY_CLIENT_SOURCE_DIR}/mbed-client-esfs/source/include) |
vithyat | 0:977e87915078 | 118 | include_directories(${FACTORY_CLIENT_SOURCE_DIR}/mbed-client-esfs/source-pal/api) |
vithyat | 0:977e87915078 | 119 | include_directories(${FACTORY_CLIENT_SOURCE_DIR}/mbed-client-esfs/source-pal/linux) |
vithyat | 0:977e87915078 | 120 | include_directories(${FACTORY_CLIENT_SOURCE_DIR}/crypto-service/crypto-service) |
vithyat | 0:977e87915078 | 121 | include_directories(${FACTORY_CLIENT_SOURCE_DIR}/crypto-service/source/include) |
vithyat | 0:977e87915078 | 122 | include_directories(${FACTORY_CLIENT_SOURCE_DIR}/secsrv-cbor/secsrv-cbor) |
vithyat | 0:977e87915078 | 123 | include_directories(${FACTORY_CLIENT_SOURCE_DIR}/fcc-bundle-handler/fcc-bundle-handler) |
vithyat | 0:977e87915078 | 124 | include_directories(${FACTORY_CLIENT_SOURCE_DIR}/fcc-bundle-handler/source/include) |
vithyat | 0:977e87915078 | 125 | include_directories(${FACTORY_CLIENT_SOURCE_DIR}/fcc-output-info-handler/fcc-output-info-handler) |
vithyat | 0:977e87915078 | 126 | |
vithyat | 0:977e87915078 | 127 | # Certificate Enrollment Client |
vithyat | 0:977e87915078 | 128 | SET(CERTIFICATE_ENROLLMENT_CLIENT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/certificate-enrollment-client) |
vithyat | 0:977e87915078 | 129 | ADD_GLOBALDIR(${CERTIFICATE_ENROLLMENT_CLIENT_SOURCE_DIR}/certificate-enrollment-client) |
vithyat | 0:977e87915078 | 130 | include_directories(${CERTIFICATE_ENROLLMENT_CLIENT_SOURCE_DIR}/certificate-enrollment-client) |
vithyat | 0:977e87915078 | 131 | include_directories(${CERTIFICATE_ENROLLMENT_CLIENT_SOURCE_DIR}/source/include) |
vithyat | 0:977e87915078 | 132 | |
vithyat | 0:977e87915078 | 133 | # Update client |
vithyat | 0:977e87915078 | 134 | |
vithyat | 0:977e87915078 | 135 | SET(UPDATE_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/update-client-hub) |
vithyat | 0:977e87915078 | 136 | |
vithyat | 0:977e87915078 | 137 | include_directories(${UPDATE_SOURCE_DIR}) |
vithyat | 0:977e87915078 | 138 | include_directories(${UPDATE_SOURCE_DIR}/modules/atomic-queue) |
vithyat | 0:977e87915078 | 139 | include_directories(${UPDATE_SOURCE_DIR}/modules/common) |
vithyat | 0:977e87915078 | 140 | include_directories(${UPDATE_SOURCE_DIR}/modules/control-center) |
vithyat | 0:977e87915078 | 141 | include_directories(${UPDATE_SOURCE_DIR}/modules/lwm2m-mbed) |
vithyat | 0:977e87915078 | 142 | include_directories(${UPDATE_SOURCE_DIR}/modules/monitor) |
vithyat | 0:977e87915078 | 143 | include_directories(${UPDATE_SOURCE_DIR}/modules/paal) |
vithyat | 0:977e87915078 | 144 | include_directories(${UPDATE_SOURCE_DIR}/modules/source) |
vithyat | 0:977e87915078 | 145 | include_directories(${UPDATE_SOURCE_DIR}/modules/source-http) |
vithyat | 0:977e87915078 | 146 | |
vithyat | 0:977e87915078 | 147 | |
vithyat | 0:977e87915078 | 148 | FILE(GLOB MBED_CLOUD_CLIENT_SRC |
vithyat | 0:977e87915078 | 149 | "${CMAKE_CURRENT_SOURCE_DIR}/source/*.c" |
vithyat | 0:977e87915078 | 150 | "${CMAKE_CURRENT_SOURCE_DIR}/source/*.cpp" |
vithyat | 0:977e87915078 | 151 | ) |
vithyat | 0:977e87915078 | 152 | |
vithyat | 0:977e87915078 | 153 | FILE(GLOB MBED_CLIENT_SRC |
vithyat | 0:977e87915078 | 154 | "${MBED_CLIENT_SOURCE_DIR}/source/*.cpp" |
vithyat | 0:977e87915078 | 155 | "${MBED_CLIENT_SOURCE_DIR}/source/*.c" |
vithyat | 0:977e87915078 | 156 | "${MBED_CLIENT_SOURCE_DIR}/mbed-client-c/source/*.c" |
vithyat | 0:977e87915078 | 157 | "${MBED_CLIENT_SOURCE_DIR}/mbed-client-classic/source/*.cpp" |
vithyat | 0:977e87915078 | 158 | "${MBED_CLIENT_SOURCE_DIR}/mbed-client-mbed-tls/source/*.cpp" |
vithyat | 0:977e87915078 | 159 | ) |
vithyat | 0:977e87915078 | 160 | |
vithyat | 0:977e87915078 | 161 | FILE(GLOB MBED_CLIENT_RANDLIB_SRC |
vithyat | 0:977e87915078 | 162 | "${CMAKE_CURRENT_SOURCE_DIR}/mbed-client-randlib/source/*.c" |
vithyat | 0:977e87915078 | 163 | ) |
vithyat | 0:977e87915078 | 164 | |
vithyat | 0:977e87915078 | 165 | # This part gets split into separate nanostacklibservice, which is needed |
vithyat | 0:977e87915078 | 166 | # as the mbedTrace -library points to ip6tos and there is a dependency chain of |
vithyat | 0:977e87915078 | 167 | # pal->mbed-trace->nanostack-libservice. Without this, the PAL should add mbedCloudClient |
vithyat | 0:977e87915078 | 168 | # as dependency and that would also create a circular dependency, which is a nightmare on linking time. |
vithyat | 0:977e87915078 | 169 | # |
vithyat | 0:977e87915078 | 170 | # Note: the native Makefile of nanostack-libservice will create a library called "libservice", |
vithyat | 0:977e87915078 | 171 | # so just to avoid some collisions, name of the library created by this is different and matches |
vithyat | 0:977e87915078 | 172 | # the current name of the repository (nanostack-libservice). |
vithyat | 0:977e87915078 | 173 | FILE(GLOB NANOSTACK_LIBSERVICE_SRC |
vithyat | 0:977e87915078 | 174 | "${CMAKE_CURRENT_SOURCE_DIR}/nanostack-libservice/source/libBits/common_functions.c" |
vithyat | 0:977e87915078 | 175 | "${CMAKE_CURRENT_SOURCE_DIR}/nanostack-libservice/source/libList/*.c" |
vithyat | 0:977e87915078 | 176 | "${CMAKE_CURRENT_SOURCE_DIR}/nanostack-libservice/source/nsdynmemLIB/*.c" |
vithyat | 0:977e87915078 | 177 | "${CMAKE_CURRENT_SOURCE_DIR}/nanostack-libservice/source/libip6string/ip6tos.c" |
vithyat | 0:977e87915078 | 178 | ) |
vithyat | 0:977e87915078 | 179 | |
vithyat | 0:977e87915078 | 180 | # eventloop library |
vithyat | 0:977e87915078 | 181 | FILE(GLOB NANOSTACK_EVENTLOOP_SRC |
vithyat | 0:977e87915078 | 182 | "${CMAKE_CURRENT_SOURCE_DIR}/sal-stack-nanostack-eventloop/source/*.c" |
vithyat | 0:977e87915078 | 183 | "${CMAKE_CURRENT_SOURCE_DIR}/sal-stack-nanostack-eventloop/source/*.h" |
vithyat | 0:977e87915078 | 184 | "${CMAKE_CURRENT_SOURCE_DIR}/sal-stack-nanostack-eventloop/source/*.cpp" |
vithyat | 0:977e87915078 | 185 | ) |
vithyat | 0:977e87915078 | 186 | |
vithyat | 0:977e87915078 | 187 | # these will go to nshalpal library |
vithyat | 0:977e87915078 | 188 | FILE(GLOB NS_HAL_PAL_SRC |
vithyat | 0:977e87915078 | 189 | "${CMAKE_CURRENT_SOURCE_DIR}/ns-hal-pal/ns_event_loop.c" |
vithyat | 0:977e87915078 | 190 | if ((${OS_BRAND} MATCHES "FreeRTOS")) |
vithyat | 0:977e87915078 | 191 | "${CMAKE_CURRENT_SOURCE_DIR}/ns-hal-pal/arm_hal_random.c" |
vithyat | 0:977e87915078 | 192 | endif() |
vithyat | 0:977e87915078 | 193 | "${CMAKE_CURRENT_SOURCE_DIR}/ns-hal-pal/ns_hal_init.c" |
vithyat | 0:977e87915078 | 194 | "${CMAKE_CURRENT_SOURCE_DIR}/ns-hal-pal/arm_hal_interrupt.c" |
vithyat | 0:977e87915078 | 195 | "${CMAKE_CURRENT_SOURCE_DIR}/ns-hal-pal/arm_hal_timer.cpp" |
vithyat | 0:977e87915078 | 196 | ) |
vithyat | 0:977e87915078 | 197 | |
vithyat | 0:977e87915078 | 198 | # mbed-coap library |
vithyat | 0:977e87915078 | 199 | FILE(GLOB MBED_COAP_SRC |
vithyat | 0:977e87915078 | 200 | "${CMAKE_CURRENT_SOURCE_DIR}/mbed-coap/source/*.c" |
vithyat | 0:977e87915078 | 201 | ) |
vithyat | 0:977e87915078 | 202 | |
vithyat | 0:977e87915078 | 203 | message("MbedCloudClient sources = \n ${MBED_CLOUD_CLIENT_SRC}") |
vithyat | 0:977e87915078 | 204 | |
vithyat | 0:977e87915078 | 205 | # Note: this is not using the CREATE_LIBRARY() on purpose, as it would pollute all the |
vithyat | 0:977e87915078 | 206 | # executables with the library. |
vithyat | 0:977e87915078 | 207 | |
vithyat | 0:977e87915078 | 208 | add_library(nshalpal STATIC "${NS_HAL_PAL_SRC}") |
vithyat | 0:977e87915078 | 209 | |
vithyat | 0:977e87915078 | 210 | # ns-hal-pal uses PAL API's, so create dependency on them |
vithyat | 0:977e87915078 | 211 | add_dependencies(nshalpal pal) |
vithyat | 0:977e87915078 | 212 | target_link_libraries(nshalpal pal) |
vithyat | 0:977e87915078 | 213 | |
vithyat | 0:977e87915078 | 214 | # nanostack-libservice is depending only of ns-hal (via platform_critical_*()), which is fulfilled |
vithyat | 0:977e87915078 | 215 | # by ns-hal-pal. |
vithyat | 0:977e87915078 | 216 | add_library(nanostacklibservice STATIC "${NANOSTACK_LIBSERVICE_SRC}") |
vithyat | 0:977e87915078 | 217 | add_dependencies(nanostacklibservice nshalpal) |
vithyat | 0:977e87915078 | 218 | target_link_libraries(nanostacklibservice nshalpal) |
vithyat | 0:977e87915078 | 219 | |
vithyat | 0:977e87915078 | 220 | # libservice is needed for ns-list and nsdynmem, so add dependencies |
vithyat | 0:977e87915078 | 221 | add_library(nanostackeventloop STATIC "${NANOSTACK_EVENTLOOP_SRC}") |
vithyat | 0:977e87915078 | 222 | add_dependencies(nanostackeventloop nanostacklibservice) |
vithyat | 0:977e87915078 | 223 | target_link_libraries(nanostackeventloop nanostacklibservice) |
vithyat | 0:977e87915078 | 224 | |
vithyat | 0:977e87915078 | 225 | # randlib depends only on ns-hal-pal |
vithyat | 0:977e87915078 | 226 | add_library(mbedclientrandlib STATIC "${MBED_CLIENT_RANDLIB_SRC}") |
vithyat | 0:977e87915078 | 227 | add_dependencies(mbedclientrandlib nshalpal) |
vithyat | 0:977e87915078 | 228 | target_link_libraries(mbedclientrandlib nshalpal) |
vithyat | 0:977e87915078 | 229 | |
vithyat | 0:977e87915078 | 230 | # libservice is needed for ns-list and nsdynmem, so add dependencies for that |
vithyat | 0:977e87915078 | 231 | add_library(mbedcoap STATIC "${MBED_COAP_SRC}") |
vithyat | 0:977e87915078 | 232 | add_dependencies(mbedcoap nanostacklibservice mbedTrace mbedclientrandlib) |
vithyat | 0:977e87915078 | 233 | target_link_libraries(mbedcoap nanostacklibservice mbedTrace mbedclientrandlib) |
vithyat | 0:977e87915078 | 234 | |
vithyat | 0:977e87915078 | 235 | add_library(mbedclient STATIC "${MBED_CLIENT_SRC}") |
vithyat | 0:977e87915078 | 236 | add_dependencies(mbedclient nanostacklibservice nanostackeventloop mbedcoap mbedTrace) |
vithyat | 0:977e87915078 | 237 | target_link_libraries(mbedclient nanostacklibservice nanostackeventloop mbedcoap mbedTrace) |
vithyat | 0:977e87915078 | 238 | |
vithyat | 0:977e87915078 | 239 | CREATE_LIBRARY(mbedCloudClient "${MBED_CLOUD_CLIENT_SRC}" "") |
vithyat | 0:977e87915078 | 240 | |
vithyat | 0:977e87915078 | 241 | # Create buld dependencies to ensure all the needed parts get build |
vithyat | 0:977e87915078 | 242 | add_dependencies(mbedCloudClient pal factory-configurator-client esfs mbedTrace nanostacklibservice nanostackeventloop mbedclient certificate-enrollment-client update-client) |
vithyat | 0:977e87915078 | 243 | |
vithyat | 0:977e87915078 | 244 | # Add linking dependency for all the subcomponents of mbedCloudClient. This allows one to |
vithyat | 0:977e87915078 | 245 | # just have "target_link_libraries(<client-application> mbedCloudClient)" and cmake will |
vithyat | 0:977e87915078 | 246 | # automatically build all the submodules. |
vithyat | 0:977e87915078 | 247 | target_link_libraries(mbedCloudClient pal factory-configurator-client esfs mbedTrace nanostacklibservice nanostackeventloop mbedclient certificate-enrollment-client update-client) |
vithyat | 0:977e87915078 | 248 | |
vithyat | 0:977e87915078 | 249 | ADDSUBDIRS() |
vithyat | 0:977e87915078 | 250 |