Imagine we have a project with two sub-projects 'foo' and 'bar'. Both of them use the CppKafka. They have the command 'find_package(CppKafka REQUIRED)' in their CMakeLists.txt file. Cmake gets this error:
CMake Error at /usr/local/lib/cmake/CppKafka/FindRdKafka.cmake:57 (add_library): add_library cannot create imported target "RdKafka::rdkafka" because another target with the same name already exists.
It occurs if we have more than one calling 'find_package(CppKafka REQUIRED)' command.
Hi,
Ubuntu version: 22.04 CppKafka version: 0.4.0 CMake version: 3.25.2
Imagine we have a project with two sub-projects 'foo' and 'bar'. Both of them use the CppKafka. They have the command 'find_package(CppKafka REQUIRED)' in their CMakeLists.txt file. Cmake gets this error:
CMake Error at /usr/local/lib/cmake/CppKafka/FindRdKafka.cmake:57 (add_library): add_library cannot create imported target "RdKafka::rdkafka" because another target with the same name already exists.
It occurs if we have more than one calling 'find_package(CppKafka REQUIRED)' command.