General purpose library for communication over the mqtt protocol
Перейти к файлу
Jelani 0cd2cd9024 Add callback function for Disconnect 2017-08-09 16:47:17 -07:00
build_all release_2017_07_28_after_bump_version 2017-07-28 08:41:22 -07:00
c-utility@19d1a4ebab update submodules 2017-08-06 20:22:34 -07: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 Add callback function for Disconnect 2017-08-09 16:47:17 -07:00
inc/azure_umqtt_c Add callback function for Disconnect 2017-08-09 16:47:17 -07:00
jenkins enable osx for umqtt 2017-01-24 16:43:36 -08:00
samples Add callback function for Disconnect 2017-08-09 16:47:17 -07:00
src Add callback function for Disconnect 2017-08-09 16:47:17 -07:00
tests Add callback function for Disconnect 2017-08-09 16:47:17 -07: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 Added in-place messaging for mqtt 2017-08-03 10:09:13 -07: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