FindLibRDKafka.cmake 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. # - Try to find LibRDKafka headers and libraries.
  2. #
  3. # Usage of this module as follows:
  4. #
  5. # find_package(LibRDKafka)
  6. #
  7. # Variables used by this module, they can change the default behaviour and need
  8. # to be set before calling find_package:
  9. #
  10. # LibRDKafka_ROOT_DIR Set this variable to the root installation of
  11. # LibRDKafka if the module has problems finding
  12. # the proper installation path.
  13. #
  14. # Variables defined by this module:
  15. #
  16. # LIBRDKAFKA_FOUND System has LibRDKafka libs/headers
  17. # LibRDKafka_LIBRARIES The LibRDKafka libraries
  18. # LibRDKafka_INCLUDE_DIR The location of LibRDKafka headers
  19. find_path(LibRDKafka_ROOT_DIR
  20. NAMES include/librdkafka/rdkafka.h
  21. )
  22. find_library(LibRDKafka_C_LIBRARIES
  23. NAMES rdkafka
  24. HINTS ${LibRDKafka_ROOT_DIR}/lib
  25. )
  26. find_path(LibRDKafka_INCLUDE_DIR
  27. NAMES librdkafka/rdkafka.h
  28. HINTS ${LibRDKafka_ROOT_DIR}/include
  29. )
  30. include(FindPackageHandleStandardArgs)
  31. find_package_handle_standard_args(LibRDKafka DEFAULT_MSG
  32. LibRDKafka_C_LIBRARIES
  33. LibRDKafka_INCLUDE_DIR
  34. )
  35. mark_as_advanced(
  36. LibRDKafka_ROOT_DIR
  37. LibRDKafka_C_LIBRARIES
  38. LibRDKafka_INCLUDE_DIR
  39. )