Extract Kafka integration to its own target

Reviewers: buda, teon.banek, msantl

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D1583
This commit is contained in:
Matej Ferencevic 2018-09-01 21:09:31 +02:00
parent d9153921b8
commit d338e753c8
4 changed files with 24 additions and 21 deletions

View File

@ -146,7 +146,7 @@ string(TOLOWER ${CMAKE_BUILD_TYPE} lower_build_type)
# memgraph_lib depend on these libraries
set(MEMGRAPH_ALL_LIBS stdc++fs Threads::Threads fmt cppitertools
antlr_opencypher_parser_lib dl glog gflags capnp kj
mg-utils mg-io mg-integrations mg-requests mg-communication mg-auth mg-stats)
mg-utils mg-io mg-integrations-kafka mg-requests mg-communication mg-auth mg-stats)
if (USE_LTALLOC)
list(APPEND MEMGRAPH_ALL_LIBS ltalloc)

View File

@ -1,20 +1,2 @@
set(integrations_src_files
kafka/streams.cpp
kafka/transform.cpp
kafka/consumer.cpp)
include(FindSeccomp.cmake)
if (NOT SECCOMP_FOUND)
message(FATAL_ERROR "Couldn't find seccomp library!")
endif()
add_library(mg-integrations STATIC ${integrations_src_files})
target_link_libraries(mg-integrations stdc++fs Threads::Threads fmt
glog gflags librdkafka++ librdkafka zlib json)
target_link_libraries(mg-integrations mg-utils mg-requests mg-communication)
target_link_libraries(mg-integrations ${Seccomp_LIBRARIES})
target_include_directories(mg-integrations SYSTEM PUBLIC ${Seccomp_INCLUDE_DIRS})
# Copy kafka.py to the root of our build directory where memgraph executable should be
configure_file(kafka/kafka.py ${CMAKE_BINARY_DIR} COPYONLY)
# kafka integration
add_subdirectory(kafka)

View File

@ -0,0 +1,21 @@
set(integrations_kafka_src_files
consumer.cpp
transform.cpp
streams.cpp)
find_package(Seccomp)
if (NOT SECCOMP_FOUND)
message(FATAL_ERROR "Couldn't find seccomp library!")
endif()
add_library(mg-integrations-kafka STATIC ${integrations_kafka_src_files})
target_link_libraries(mg-integrations-kafka stdc++fs Threads::Threads fmt
glog gflags librdkafka++ librdkafka zlib json)
target_link_libraries(mg-integrations-kafka mg-utils
mg-requests mg-communication)
target_link_libraries(mg-integrations-kafka ${Seccomp_LIBRARIES})
target_include_directories(mg-integrations-kafka SYSTEM PUBLIC ${Seccomp_INCLUDE_DIRS})
# Copy kafka.py to the root of our build directory where memgraph executable should be
configure_file(kafka.py ${CMAKE_BINARY_DIR} COPYONLY)