User Tools

Site Tools


public:mosquitto-clients

mosquitto-clients

to be able to build anything on MacOS, install Command Line Tools for Xcode using the following command:

xcode-select --install

cmake

To successfully build mosquitto, cmake is required. To install cmake, follow along these instructions: https://cmake.org/install/.

First time install:

./bootstrap
make
make install

Updating cmake:

cmake .
make      
make install

mosquitto-clients

Clone master-branch from Github:

git clone --single-branch -b master https://github.com/eclipse/mosquitto.git

Change directory into mosquitto:

cd ./mosquitto

Building with SSL-support

When building with SSL:

export OPENSSL_ROOT_DIR="$HOME_BREW/Cellar/openssl/1.x.x"
export OPENSSL_INCLUDE_DIR="$OPENSSL_ROOT_DIR/include"

Generate makefiles

cmake .

make & install libmosquitto

cd ./lib
make
sudo make install

make & install mosquitto clients

cd ../client
make
sudo make install

In case you screwed up, clean directory and repeat

git clean -f -d
git reset --hard

Alternatively: Build without SSL

To build without SSL-support add option -DWITH_TLS=OFF. This inherits -DWITH_TLS_PSK=OFF.

Other options

  • c-ares (libc-ares-dev on Debian based systems) - disable with `make WITH_SRV=no`
  • libuuid (uuid-dev) - disable with `make WITH_UUID=no`
  • libwebsockets (libwebsockets-dev) - enable with `make WITH_WEBSOCKETS=yes`
  • openssl (libssl-dev on Debian based systems) - disable with `make WITH_TLS=no`

cmake: Surpress Policy CMP0042 Warning

Add -DCMAKE_MACOSX_RPATH=ON to cmake command

c-ares

If you build with -WITH_SRV=OFF this is not needed.

Download latest archive from https://c-ares.haxx.se

./configure
make
sudo make install
public/mosquitto-clients.txt ยท Last modified: 2018/05/28 21:25 by jan

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki