diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..d5d89ad --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,43 @@ +# CMakeLists files in this project can +# refer to the root source directory of the project as ${HELLO_SOURCE_DIR} and +# to the root binary directory of the project as ${HELLO_BINARY_DIR}. +cmake_minimum_required (VERSION 3.0) + +project (domo) + +set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/build/lib") +set(EXECUTABLE_OUTPUT_PATH "${CMAKE_SOURCE_DIR}/build/bin") + +# Options for libevent +set(EVENT__LIBRARY_TYPE STATIC) +set(EVENT__DISABLE_TESTS ON) +set(EVENT__DISABLE_REGRESS ON) +set(EVENT__DISABLE_SAMPLES ON) +set(EVENT__DISABLE_BENCHMARK ON) + +# Options for nats.c +set(NATS_BUILD_EXAMPLES OFF) +set(NATS_BUILD_STREAMING OFF) +set(NATS_BUILD_TLS_USE_OPENSSL_1_1_API ON) +set(NATS_BUILD_WITH_TLS OFF) +set(NATS_BUILD_LIB_SHARED OFF) + +# Options for json-c +set(BUILD_SHARED_LIBS OFF) + +# Directoy of the project. +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../qlibc ${CMAKE_CURRENT_BINARY_DIR}/qlibc) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../libevent ${CMAKE_CURRENT_BINARY_DIR}/libevent) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../nats.c ${CMAKE_CURRENT_BINARY_DIR}/nats.c) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../json-c ${CMAKE_CURRENT_BINARY_DIR}/json-c) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/domo-iot/lib) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/domo-iot/src) + +add_custom_target (static_analysis + COMMAND echo "Static Analysis ......" + COMMAND ${CMAKE_SOURCE_DIR}/tools/static_analysis.sh ${CMAKE_SOURCE_DIR}/build +) + +add_custom_target (valgrind + COMMAND valgrind --leak-check=full --trace-children=yes --malloc-fill=AE --free-fill=BD --track-origins=yes ${CMAKE_SOURCE_DIR}/build/bin/domo-iot +) diff --git a/README.md b/README.md index 052b587..027d2c2 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,11 @@ # Domo-iot +Main daemon of the domo project. -[![Build Status](https://drone.nadal-fr.com/api/badges/rpi/domo/status.svg)](https://drone.nadal-fr.com/rpi/domo) +[![Build Status](https://drone.nadal-fr.com/api/badges/domo/domo-iot/status.svg)](https://drone.nadal-fr.com/domo/domo-iot) +## Usefully documentations https://auth0.com/docs/flows/guides/device-auth/call-api-device-auth