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:
Markus Makela
2015-11-25 06:26:06 +02:00
parent 6ea209d13a
commit 443bbe73d2
5 changed files with 19 additions and 82 deletions

View File

@ -1,9 +1,12 @@
if(BUILD_RABBITMQ)
find_package(RabbitMQ)
include_directories(${RABBITMQ_HEADERS})
add_library(mqfilter SHARED mqfilter.c)
target_link_libraries(mqfilter query_classifier log_manager ${RABBITMQ_LIBRARIES})
install(TARGETS mqfilter DESTINATION ${MAXSCALE_LIBDIR})
if(RABBITMQ_FOUND)
include_directories(${RABBITMQ_HEADERS})
add_library(mqfilter SHARED mqfilter.c)
target_link_libraries(mqfilter query_classifier log_manager ${RABBITMQ_LIBRARIES})
install(TARGETS mqfilter DESTINATION ${MAXSCALE_LIBDIR})
else()
message(WARNING "Could not find librabbitmq, the mqfilter will not be built.")
endif()
endif()
add_library(regexfilter SHARED regexfilter.c)