General purpose library for communication over the mqtt protocol
Перейти к файлу
Dan Cristoloveanu 57f89ba957 Switch cmake option from skip_unittests to run_unittests and default to OFF 2016-12-05 14:03:15 -08:00
build_all Switch cmake option from skip_unittests to run_unittests and default to OFF 2016-12-05 14:03:15 -08:00
c-utility@66f4822e9d Switch cmake option from skip_unittests to run_unittests and default to OFF 2016-12-05 14:03:15 -08:00
configs Makes umqtt installable and a find module in CMake. Builds with -fPIC always. 2016-11-09 09:58:30 -08:00
devdoc/requirement_docs Carve errors from umqtt 2016-10-24 17:12:14 -07:00
inc/azure_umqtt_c Carve errors from umqtt 2016-10-24 17:12:14 -07:00
jenkins Switch cmake option from skip_unittests to run_unittests and default to OFF 2016-12-05 14:03:15 -08:00
samples Carve errors from umqtt 2016-10-24 17:12:14 -07:00
src Replace FORMAT_HEX_CHAR by ‘0x%02x ‘ in the LOGs at mqtt_client.c. This const makes Arduinos' compiler confused where to put this string. 2016-11-18 17:02:50 -08:00
tests Update to utilize `tickcounter_ms_t` 2016-11-16 15:17:31 -08:00
tools Change kickjenkins to accept argument for integrate into develop_c 2016-09-20 08:44:33 -07:00
.gitignore Makes umqtt installable and a find module in CMake. Builds with -fPIC always. 2016-11-09 09:58:30 -08:00
.gitmodules Renames shared utility submodule and updates this submodule. 2016-10-04 13:23:12 -07:00
CMakeLists.txt Switch cmake option from skip_unittests to run_unittests and default to OFF 2016-12-05 14:03:15 -08:00
LICENSE Update mqtt repo with initial files 2015-12-04 14:05:59 -08:00
dependencies-test.cmake Makes umqtt installable and a find module in CMake. Builds with -fPIC always. 2016-11-09 09:58:30 -08:00
dependencies.cmake Makes umqtt installable and a find module in CMake. Builds with -fPIC always. 2016-11-09 09:58:30 -08:00
readme.md Switch cmake option from skip_unittests to run_unittests and default to OFF 2016-12-05 14:03:15 -08:00

readme.md

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Microsoft Azure MQTT

azure-umqtt-c is a general purpose library build for MQTT protocol

Dependencies

azure-mqtt client use the azure-c-shared-utility, which is a C library provisioning common functionality for basic tasks (like string, list manipulation, IO, etc.). azure-c-shared-utility is available here: https://github.com/Azure/azure-c-shared-utility. azure-c-shared-utility needs to be built before building azure-mqtt-c.

Setup

Build

  • Clone azure-umqtt-c by:
git clone --recursive https://github.com/Azure/azure-umqtt-c.git
  • Create a folder cmake under azure-umqtt-c

  • Switch to the cmake folder and run

cmake ..
  • Build
cmake --build .

Installation and Use

Optionally, you may choose to install azure-umqtt-c on your machine:

  1. Switch to the cmake folder and run

    cmake -Duse_installed=ON ../
    
    cmake --build . --target install
    

    or install using the follow commands for each platform:

    On Linux:

    sudo make install
    

    On Windows:

    msbuild /m INSTALL.vcxproj
    
  2. Use it in your project (if installed)

    find_package(umqtt REQUIRED CONFIG)
    target_link_library(yourlib umqtt)
    

This requires that azure-c-shared-utility is installed (through CMake) on your machine.

If running tests, this requires that umock-c, azure-ctest, and azure-c-testrunnerswitcher are installed (through CMake) on your machine.

Building the tests

In order to build the tests use:

cmake .. -Drun_unittests:bool=ON