@PACKAGE_INIT@

include(CMakeFindDependencyMacro)

# Add FindRdKafka.cmake
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_LIST_DIR}")

# Find boost optional
find_dependency(Boost REQUIRED)

# Try to find the RdKafka configuration file if present.
# This will search default system locations as well as RdKafka_ROOT and RdKafka_Dir paths if specified.
find_dependency(RdKafka QUIET CONFIG)
set(RDKAFKA_TARGET_IMPORTS ${RdKafka_FOUND})
if (NOT RdKafka_FOUND)
    message(STATUS "RdKafkaConfig.cmake not found. Attempting to find module instead...")
    find_dependency(RdKafka REQUIRED QUIET MODULE)
    if (NOT RdKafka_FOUND)
        message(FATAL_ERROR "RdKafka module not found. Please set RDKAFKA_ROOT to the install path or RDKAFKA_DIR pointing to the RdKafka configuration file location.")
    else()
        message(STATUS "RdKafka module found.")
    endif()
else()
    message(STATUS "RdKafka configuration file found: ${RdKafka_CONFIG}")
endif()

include("${CMAKE_CURRENT_LIST_DIR}/@TARGET_EXPORT_NAME@.cmake")

# Export 'CppKafka_ROOT'
set_and_check(@PROJECT_NAME@_ROOT "@PACKAGE_CMAKE_INSTALL_PREFIX@")

# Export 'CppKafka_INSTALL_INCLUDE_DIR'
set_and_check(@PROJECT_NAME@_INSTALL_INCLUDE_DIR "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@")

# Export 'CppKafka_INSTALL_LIB_DIR'
set_and_check(@PROJECT_NAME@_INSTALL_LIB_DIR "@PACKAGE_CMAKE_INSTALL_LIBDIR@")

# Validate installed components
check_required_components("@PROJECT_NAME@")

@PACKAGE_INIT@

include(CMakeFindDependencyMacro)

# Add FindRdKafka.cmake
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_LIST_DIR}")

# Find boost optional
find_dependency(Boost REQUIRED)

# Try to find the RdKafka configuration file if present.
# This will search default system locations as well as RdKafka_ROOT and RdKafka_Dir paths if specified.
find_dependency(RdKafka QUIET CONFIG)
set(RDKAFKA_TARGET_IMPORTS ${RdKafka_FOUND})
if (NOT RdKafka_FOUND)
    find_dependency(RdKafka REQUIRED MODULE)
endif()

include("${CMAKE_CURRENT_LIST_DIR}/@TARGET_EXPORT_NAME@.cmake")

# Export 'CppKafka_ROOT'
set_and_check(@PROJECT_NAME@_ROOT "@PACKAGE_CMAKE_INSTALL_PREFIX@")

# Export 'CppKafka_INSTALL_INCLUDE_DIR'
set_and_check(@PROJECT_NAME@_INSTALL_INCLUDE_DIR "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@")

# Export 'CppKafka_INSTALL_LIB_DIR'
set_and_check(@PROJECT_NAME@_INSTALL_LIB_DIR "@PACKAGE_CMAKE_INSTALL_LIBDIR@")

# Validate installed components
check_required_components("@PROJECT_NAME@")

Remove comment from config file relating to not finding the RdKafka config file.
Remove comment from config file relating to not finding the RdKafka config file.
