1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

Merge pull request #674 from VILLASframework/fix-amqp

node-amqp: Handle moved include dir of rabbitmq-c
This commit is contained in:
Steffen Vogel 2023-06-21 16:32:23 +02:00 committed by GitHub
commit 3d6e5204ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 20 additions and 0 deletions

View file

@ -145,6 +145,12 @@ if (REDISPP_FOUND)
endif()
endif()
if (RABBITMQ_C_FOUND)
if (EXISTS "${RABBITMQ_C_INCLUDEDIR}/rabbitmq-c/amqp.h")
set(RABBITMQ_C_NEW_INCLUDE_DIR ON)
endif()
endif()
# Check if libwebsockets is build with deflate extension
if(${CMAKE_VERSION} VERSION_LESS "3.12.4")
set(LWS_LOCATION "${LIBWEBSOCKETS_LIBRARY_DIRS}/lib${LIBWEBSOCKETS_LIBRARIES}.so")

View file

@ -59,3 +59,4 @@
#cmakedefine LWS_DEFLATE_FOUND
#cmakedefine REDISPP_WITH_TLS
#cmakedefine REDISPP_WITH_URI
#cmakedefine RABBITMQ_C_NEW_INCLUDE_DIR

View file

@ -8,7 +8,13 @@
#pragma once
#include <villas/node/config.hpp>
#ifdef RABBITMQ_C_NEW_INCLUDE_DIR
#include <rabbitmq-c/amqp.h>
#else
#include <amqp.h>
#endif
#include <villas/list.hpp>
#include <villas/format.hpp>

View file

@ -7,8 +7,15 @@
#include <cstring>
#include <villas/node/config.hpp>
#ifdef RABBITMQ_C_NEW_INCLUDE_DIR
#include <rabbitmq-c/ssl_socket.h>
#include <rabbitmq-c/tcp_socket.h>
#else
#include <amqp_ssl_socket.h>
#include <amqp_tcp_socket.h>
#endif
#include <villas/node_compat.hpp>
#include <villas/nodes/amqp.hpp>