Mqfilter is built if possible
The mqfilter was not built by default even though it should have been. This has been fixed but the filter is built only if librabbitmq is found. This was done to avoid having the librabbitmq and its development headers as a hard dependency.
This commit is contained in:
@ -1,11 +1,12 @@
|
||||
# This CMake file tries to find the the RabbitMQ library
|
||||
# This CMake file tries to find the the RabbitMQ 0.5 library
|
||||
# The following variables are set:
|
||||
# RABBITMQ_FOUND - System has RabbitMQ client
|
||||
# RABBITMQ_LIBRARIES - The RabbitMQ client library
|
||||
# RABBITMQ_HEADERS - The RabbitMQ client headers
|
||||
|
||||
include(CheckCSourceCompiles)
|
||||
find_library(RABBITMQ_LIBRARIES NAMES rabbitmq)
|
||||
find_path(RABBITMQ_HEADERS amqp.h PATH_SUFFIXES mysql mariadb)
|
||||
find_path(RABBITMQ_HEADERS amqp.h)
|
||||
|
||||
if(${RABBITMQ_LIBRARIES} MATCHES "NOTFOUND")
|
||||
set(RABBITMQ_FOUND FALSE CACHE INTERNAL "")
|
||||
@ -17,7 +18,9 @@ else()
|
||||
endif()
|
||||
|
||||
set(CMAKE_REQUIRED_INCLUDES ${RABBITMQ_HEADERS})
|
||||
|
||||
check_c_source_compiles("#include <amqp.h>\n int main(){if(AMQP_DELIVERY_PERSISTENT){return 0;}return 1;}" HAVE_RABBITMQ50)
|
||||
if(NOT HAVE_RABBITMQ50)
|
||||
message(FATAL_ERROR "Old version of RabbitMQ-C library found. Version 0.5 or newer is required.")
|
||||
endif()
|
||||
|
||||
if(RABBITMQ_FOUND AND NOT HAVE_RABBITMQ50)
|
||||
message(WARNING "Old version of RabbitMQ-C library found. Version 0.5 or newer is required.")
|
||||
endif()
|
||||
|
@ -57,7 +57,7 @@ macro(set_variables)
|
||||
set(STATIC_EMBEDDED TRUE CACHE BOOL "Use static version of libmysqld")
|
||||
|
||||
# Build RabbitMQ components
|
||||
set(BUILD_RABBITMQ FALSE CACHE BOOL "Build RabbitMQ components")
|
||||
set(BUILD_RABBITMQ TRUE CACHE BOOL "Build RabbitMQ components")
|
||||
|
||||
# Build the binlog router
|
||||
set(BUILD_BINLOG TRUE CACHE BOOL "Build binlog router")
|
||||
|
Reference in New Issue
Block a user