Skip to content

Commit

Permalink
Minor fixes for kafka dependency (#2422)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
knopers8 authored Sep 24, 2024
1 parent 9ac0bcf commit a004234
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
4 changes: 3 additions & 1 deletion Framework/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ target_include_directories(O2QualityControlKafkaProtos PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>"
)

file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/proto")

protobuf_generate(
TARGET O2QualityControlKafkaProtos
IMPORT_DIRS "${CMAKE_CURRENT_LIST_DIR}/proto"
Expand Down Expand Up @@ -127,7 +129,7 @@ target_include_directories(
PUBLIC $<INSTALL_INTERFACE:include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
${MODERNCPPKAFKA_ROOT}
$<BUILD_INTERFACE:${RDFKAFKA_INCLUDE}>
$<BUILD_INTERFACE:${RDKAFKA_INCLUDE}>
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>
)
Expand Down

0 comments on commit a004234

Please sign in to comment.