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/update-client-hub/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 2.8) |
vithyat | 0:977e87915078 | 4 | SET(CMAKE_SYSTEM_NAME Generic) |
vithyat | 0:977e87915078 | 5 | |
vithyat | 0:977e87915078 | 6 | SET(UPDATE_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) |
vithyat | 0:977e87915078 | 7 | |
vithyat | 0:977e87915078 | 8 | project(update-client) |
vithyat | 0:977e87915078 | 9 | |
vithyat | 0:977e87915078 | 10 | # Add just the base of update-client and the shared part of modules to global include path. |
vithyat | 0:977e87915078 | 11 | # This helps a lot in keeping the global include path small as the global includes really |
vithyat | 0:977e87915078 | 12 | # are given to every single source module, even though the include files themselves really |
vithyat | 0:977e87915078 | 13 | # are accessed by update-client with very clean and precise manner. |
vithyat | 0:977e87915078 | 14 | ADD_GLOBALDIR(${UPDATE_SOURCE_DIR}) |
vithyat | 0:977e87915078 | 15 | ADD_GLOBALDIR(${UPDATE_SOURCE_DIR}/modules/atomic-queue) |
vithyat | 0:977e87915078 | 16 | ADD_GLOBALDIR(${UPDATE_SOURCE_DIR}/modules/common) |
vithyat | 0:977e87915078 | 17 | ADD_GLOBALDIR(${UPDATE_SOURCE_DIR}/modules/metadata-header) |
vithyat | 0:977e87915078 | 18 | ADD_GLOBALDIR(${UPDATE_SOURCE_DIR}/modules/control-center) |
vithyat | 0:977e87915078 | 19 | ADD_GLOBALDIR(${UPDATE_SOURCE_DIR}/modules/lwm2m-mbed) |
vithyat | 0:977e87915078 | 20 | ADD_GLOBALDIR(${UPDATE_SOURCE_DIR}/modules/monitor) |
vithyat | 0:977e87915078 | 21 | ADD_GLOBALDIR(${UPDATE_SOURCE_DIR}/modules/paal) |
vithyat | 0:977e87915078 | 22 | ADD_GLOBALDIR(${UPDATE_SOURCE_DIR}/modules/source) |
vithyat | 0:977e87915078 | 23 | ADD_GLOBALDIR(${UPDATE_SOURCE_DIR}/modules/source-http) |
vithyat | 0:977e87915078 | 24 | |
vithyat | 0:977e87915078 | 25 | include_directories(${UPDATE_SOURCE_DIR}/update-client-hub) |
vithyat | 0:977e87915078 | 26 | include_directories(${UPDATE_SOURCE_DIR}/modules/atomic-queue/atomic-queue) |
vithyat | 0:977e87915078 | 27 | include_directories(${UPDATE_SOURCE_DIR}/modules/common/update-client-common) |
vithyat | 0:977e87915078 | 28 | include_directories(${UPDATE_SOURCE_DIR}/modules/metadata-header/update-client-metadata-header) |
vithyat | 0:977e87915078 | 29 | include_directories(${UPDATE_SOURCE_DIR}/modules/resume-engine) |
vithyat | 0:977e87915078 | 30 | include_directories(${UPDATE_SOURCE_DIR}/modules/resume-engine/resume-engine) |
vithyat | 0:977e87915078 | 31 | include_directories(${UPDATE_SOURCE_DIR}/modules/control-center/update-client-control-center) |
vithyat | 0:977e87915078 | 32 | include_directories(${UPDATE_SOURCE_DIR}/modules/device-identity) |
vithyat | 0:977e87915078 | 33 | include_directories(${UPDATE_SOURCE_DIR}/modules/device-identity/pal4life-device-identity) |
vithyat | 0:977e87915078 | 34 | include_directories(${UPDATE_SOURCE_DIR}/modules/firmware-manager) |
vithyat | 0:977e87915078 | 35 | include_directories(${UPDATE_SOURCE_DIR}/modules/firmware-manager/update-client-firmware-manager) |
vithyat | 0:977e87915078 | 36 | include_directories(${UPDATE_SOURCE_DIR}/modules/lwm2m-mbed/update-client-lwm2m) |
vithyat | 0:977e87915078 | 37 | include_directories(${UPDATE_SOURCE_DIR}/modules/manifest-manager) |
vithyat | 0:977e87915078 | 38 | include_directories(${UPDATE_SOURCE_DIR}/modules/manifest-manager/update-client-manifest-manager) |
vithyat | 0:977e87915078 | 39 | include_directories(${UPDATE_SOURCE_DIR}/modules/manifest-manager/source) |
vithyat | 0:977e87915078 | 40 | include_directories(${UPDATE_SOURCE_DIR}/modules/monitor/update-client-monitor) |
vithyat | 0:977e87915078 | 41 | include_directories(${UPDATE_SOURCE_DIR}/modules/paal-update-api) |
vithyat | 0:977e87915078 | 42 | include_directories(${UPDATE_SOURCE_DIR}/modules/paal-update-api/paal-update-api) |
vithyat | 0:977e87915078 | 43 | include_directories(${UPDATE_SOURCE_DIR}/modules/source/update-client-source) |
vithyat | 0:977e87915078 | 44 | include_directories(${UPDATE_SOURCE_DIR}/modules/source-http/update-client-source-http) |
vithyat | 0:977e87915078 | 45 | include_directories(${UPDATE_SOURCE_DIR}/modules/source-http-socket) |
vithyat | 0:977e87915078 | 46 | include_directories(${UPDATE_SOURCE_DIR}/modules/source-http-socket/update-client-source-http-socket) |
vithyat | 0:977e87915078 | 47 | include_directories(${UPDATE_SOURCE_DIR}/modules/source-manager) |
vithyat | 0:977e87915078 | 48 | include_directories(${UPDATE_SOURCE_DIR}/modules/source-manager/update-client-source-manager) |
vithyat | 0:977e87915078 | 49 | include_directories(${UPDATE_SOURCE_DIR}/modules/paal/update-client-paal) |
vithyat | 0:977e87915078 | 50 | include_directories(${UPDATE_SOURCE_DIR}/modules/pal-filesystem) |
vithyat | 0:977e87915078 | 51 | include_directories(${UPDATE_SOURCE_DIR}/modules/pal-filesystem/update-client-pal-filesystem) |
vithyat | 0:977e87915078 | 52 | include_directories(${UPDATE_SOURCE_DIR}/modules/pal-flashiap) |
vithyat | 0:977e87915078 | 53 | include_directories(${UPDATE_SOURCE_DIR}/modules/pal-flashiap/update-client-pal-flashiap) |
vithyat | 0:977e87915078 | 54 | include_directories(${UPDATE_SOURCE_DIR}/modules/pal-linux) |
vithyat | 0:977e87915078 | 55 | include_directories(${UPDATE_SOURCE_DIR}/modules/pal-linux/update-client-pal-linux) |
vithyat | 0:977e87915078 | 56 | |
vithyat | 0:977e87915078 | 57 | # XXX: currently only the Linux target builds out of the cmake environments, so |
vithyat | 0:977e87915078 | 58 | # let's ignore most of the code on other OS'. |
vithyat | 0:977e87915078 | 59 | # |
vithyat | 0:977e87915078 | 60 | # Note: the library needs to have _some_ source file in it, so on else branch |
vithyat | 0:977e87915078 | 61 | # the most generic ones are added to it. |
vithyat | 0:977e87915078 | 62 | # |
vithyat | 0:977e87915078 | 63 | # Note2: the created library is not really useful, but with it, the consumer side, |
vithyat | 0:977e87915078 | 64 | # eg. mbed-cloud-client and re-use the include declarations the library has and |
vithyat | 0:977e87915078 | 65 | # it does not need to have local include_directories() statements for cases when |
vithyat | 0:977e87915078 | 66 | # the update client is not really functional. |
vithyat | 0:977e87915078 | 67 | if (${OS_BRAND} MATCHES "Linux") |
vithyat | 0:977e87915078 | 68 | FILE(GLOB UPDATE_SRC |
vithyat | 0:977e87915078 | 69 | "${UPDATE_SOURCE_DIR}/source/*.c" |
vithyat | 0:977e87915078 | 70 | "${UPDATE_SOURCE_DIR}/modules/atomic-queue/source/*.c" |
vithyat | 0:977e87915078 | 71 | "${UPDATE_SOURCE_DIR}/modules/common/source/*.c" |
vithyat | 0:977e87915078 | 72 | "${UPDATE_SOURCE_DIR}/modules/metadata-header/source/*.c" |
vithyat | 0:977e87915078 | 73 | "${UPDATE_SOURCE_DIR}/modules/resume-engine/source/*.c" |
vithyat | 0:977e87915078 | 74 | "${UPDATE_SOURCE_DIR}/modules/control-center/source/*.c" |
vithyat | 0:977e87915078 | 75 | "${UPDATE_SOURCE_DIR}/modules/device-identity/source/*.c" |
vithyat | 0:977e87915078 | 76 | "${UPDATE_SOURCE_DIR}/modules/firmware-manager/source/*.c" |
vithyat | 0:977e87915078 | 77 | "${UPDATE_SOURCE_DIR}/modules/lwm2m-mbed/source/*.cpp" |
vithyat | 0:977e87915078 | 78 | "${UPDATE_SOURCE_DIR}/modules/lwm2m-mbed/source/*.c" |
vithyat | 0:977e87915078 | 79 | "${UPDATE_SOURCE_DIR}/modules/manifest-manager/source/*.c" |
vithyat | 0:977e87915078 | 80 | "${UPDATE_SOURCE_DIR}/modules/source-http/source/*.c" |
vithyat | 0:977e87915078 | 81 | "${UPDATE_SOURCE_DIR}/modules/source-http-socket/source/*.c" |
vithyat | 0:977e87915078 | 82 | "${UPDATE_SOURCE_DIR}/modules/source-manager/source/*.c" |
vithyat | 0:977e87915078 | 83 | "${UPDATE_SOURCE_DIR}/modules/paal/source/*.c" |
vithyat | 0:977e87915078 | 84 | "${UPDATE_SOURCE_DIR}/modules/pal-filesystem/source/*.c" |
vithyat | 0:977e87915078 | 85 | "${UPDATE_SOURCE_DIR}/modules/pal-flashiap/source/*.c" |
vithyat | 0:977e87915078 | 86 | "${UPDATE_SOURCE_DIR}/modules/pal-flashiap/source/*.cpp" |
vithyat | 0:977e87915078 | 87 | "${UPDATE_SOURCE_DIR}/modules/pal-linux/source/*.c" |
vithyat | 0:977e87915078 | 88 | ) |
vithyat | 0:977e87915078 | 89 | else() |
vithyat | 0:977e87915078 | 90 | FILE(GLOB UPDATE_SRC |
vithyat | 0:977e87915078 | 91 | "${UPDATE_SOURCE_DIR}/source/*.c" |
vithyat | 0:977e87915078 | 92 | ) |
vithyat | 0:977e87915078 | 93 | endif() |
vithyat | 0:977e87915078 | 94 | |
vithyat | 0:977e87915078 | 95 | # log the source list as other components do. Sometimes this is useful. |
vithyat | 0:977e87915078 | 96 | message("update-client = ${UPDATE_SRC}") |
vithyat | 0:977e87915078 | 97 | |
vithyat | 0:977e87915078 | 98 | # create a library and describe its dependencies |
vithyat | 0:977e87915078 | 99 | add_library(update-client STATIC "${UPDATE_SRC}") |
vithyat | 0:977e87915078 | 100 | add_dependencies(update-client mbedclient mbedTrace mbedcrypto mbedx509) |
vithyat | 0:977e87915078 | 101 | target_link_libraries(update-client mbedclient mbedTrace mbedcrypto mbedx509) |
vithyat | 0:977e87915078 | 102 | |
vithyat | 0:977e87915078 | 103 | # add pal dependency only for full client builds |
vithyat | 0:977e87915078 | 104 | if (NOT ${BUILD_TYPE} STREQUAL "client-lite") |
vithyat | 0:977e87915078 | 105 | add_dependencies(update-client pal) |
vithyat | 0:977e87915078 | 106 | target_link_libraries(update-client pal) |
vithyat | 0:977e87915078 | 107 | endif() |