From 94b05260fba5f65dc6cef588090f6f424bb27a55 Mon Sep 17 00:00:00 2001 From: ubaldot Date: Mon, 29 Apr 2024 11:40:56 +0200 Subject: [PATCH] Added ZeroMQ and updated docs (#950) --- CMakeLists.txt | 9 +++++++++ COMPILE.md | 4 +--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9a0fa37d8..0aa6fa0a5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,6 +39,15 @@ if(VCPKG_TOOLCHAIN) message(STATUS "BUILDING_WITH_VCPKG") endif() +# Include PkgConfig module +find_package(PkgConfig REQUIRED) + +# Use pkg_check_modules to find ZeroMQ +pkg_check_modules(ZEROMQ REQUIRED IMPORTED_TARGET libzmq) + +# Include ZeroMQ directories +include_directories(${ZEROMQ_INCLUDE_DIRS}) + find_package(ament_cmake QUIET) find_package(catkin QUIET) diff --git a/COMPILE.md b/COMPILE.md index fbae2d4e0..081238438 100644 --- a/COMPILE.md +++ b/COMPILE.md @@ -87,7 +87,7 @@ docker buildx build -o . . On Mac, the dependencies can be installed using [brew](https://brew.sh/) with the following command: ```shell -brew install cmake qt@5 protobuf mosquitto zeromq zstd +brew install cmake qt@5 protobuf mosquitto zeromq zstd zmqpp ``` If a newer version of qt is installed, you may need to temporarily link to qt5 @@ -103,7 +103,6 @@ Add CMake into your env-vars to be detected by cmake echo 'QT_HOME=$(brew --prefix qt@5) \ export CPPFLAGS="-I $QT_HOME/include" \ export PKG_CONFIG_PATH="$QT_HOME/lib/pkgconfig" \ -export LDFLAGS="$QT_HOME/lib"' >> $HOME/.zshrc ``` If you don't want to permanently add them into your main file, you can try by just exporting locally in the current terminal with: @@ -112,7 +111,6 @@ If you don't want to permanently add them into your main file, you can try by ju QT_HOME=$(brew --prefix qt@5) export CPPFLAGS="-I $QT_HOME/include" export PKG_CONFIG_PATH="$QT_HOME/lib/pkgconfig" -export LDFLAGS="$QT_HOME/lib" ``` Clone the repository into **~/plotjuggler_ws**: