Skip to content

RdKafka_LIBRARY_DIR-NOTFOUND error #218

@AndreMoukarzel

Description

@AndreMoukarzel

I've been trying to compile cppkafka as instructed in the README.md, by running the cmake .. from inside a build folder.

When I ran the command, I get the following message:

-- Build will generate a shared library. Use CPPKAFKA_BUILD_SHARED=0 to perform a static build
-- RdKafkaConfig.cmake not found. Attempting to find module instead...
-- Could NOT find RDKAFKA (missing: RdKafka_LIBRARY_DIR) 
-- Found valid rdkafka version
-- RdKafka module found.
-- Disabling tests because submodule Catch2 isn't checked out
-- Configuring done
CMake Error in src/CMakeLists.txt:
  Target "RdKafka::rdkafka" contains relative path in its
  INTERFACE_LINK_DIRECTORIES:

    "RdKafka_LIBRARY_DIR-NOTFOUND"

I have downloaded librdkafka (version 1.1.0) from it's repository and built it both the "regular" (with . /configure, make and sudo make install) and using cmake, as instructed in librdkafka/packaging/cmake/README.md

A RdKafkaConfig.cmake file was created in my /librdkafka/_cmake_build/generated folder.

I've tried to set RDKAFKA_ROOT or RDKAFKA_DIR to this directory and more top-level directories of the librdkafka folder, but the error persists. I image I just need to use one of the CMake options to make it work, but don't know which or what to set it to...

Thank you in advance for any help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions