diff --git a/src/integrations/FindSeccomp.cmake b/cmake/FindSeccomp.cmake similarity index 100% rename from src/integrations/FindSeccomp.cmake rename to cmake/FindSeccomp.cmake diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 76af96e70..8db566170 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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) diff --git a/src/integrations/CMakeLists.txt b/src/integrations/CMakeLists.txt index 24bd69658..44a7e0b80 100644 --- a/src/integrations/CMakeLists.txt +++ b/src/integrations/CMakeLists.txt @@ -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) diff --git a/src/integrations/kafka/CMakeLists.txt b/src/integrations/kafka/CMakeLists.txt new file mode 100644 index 000000000..c48ac0f9d --- /dev/null +++ b/src/integrations/kafka/CMakeLists.txt @@ -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)