From a00423486f216aa7e45accea4c7710f8c608fca1 Mon Sep 17 00:00:00 2001 From: Piotr Konopka Date: Tue, 24 Sep 2024 08:18:23 +0200 Subject: [PATCH] Minor fixes for kafka dependency (#2422) * Minor fixes for kafka dependency For some reason I cannot build QC without these fixes on my setup. This includes: - fixing a typo RDFKAFKA_INCLUDE -> RDKAFKA_INCLUDE - include modern cpp kafka headers - create `protos` directory in build directory when it's not there * remove "/include" suffix to MODERNCPPKAFKA_ROOT for backwards compatibility --- CMakeLists.txt | 2 +- Framework/CMakeLists.txt | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 422a60e32c..ed504a63fd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -105,7 +105,7 @@ find_package(ROOT 6.06.02 COMPONENTS RHTTP Gui REQUIRED) # rdkafka is built by configure and does not provide FindPackage.cmake file find_library(RDKAFKA_LIB rdkafka REQUIRED PATHS ${RDKAFKA_ROOT}/lib) -set(RDFKAFKA_INCLUDE "${RDKAFKA_ROOT}/include") +set(RDKAFKA_INCLUDE "${RDKAFKA_ROOT}/include") configure_file(getTestDataDirectory.cxx.in getTestDataDirectory.cxx) diff --git a/Framework/CMakeLists.txt b/Framework/CMakeLists.txt index 5f729d5e97..104115d9b9 100644 --- a/Framework/CMakeLists.txt +++ b/Framework/CMakeLists.txt @@ -48,6 +48,8 @@ target_include_directories(O2QualityControlKafkaProtos PUBLIC "$" ) +file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/proto") + protobuf_generate( TARGET O2QualityControlKafkaProtos IMPORT_DIRS "${CMAKE_CURRENT_LIST_DIR}/proto" @@ -127,7 +129,7 @@ target_include_directories( PUBLIC $ $ ${MODERNCPPKAFKA_ROOT} - $ + $ PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src $ )