Findplog.cmake 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #[=======================================================================[.rst
  2. Findplog
  3. ----------
  4. FindModule for Plog library
  5. Imported Targets
  6. ^^^^^^^^^^^^^^^^
  7. This module defines the :prop_tgt:`IMPORTED` target ``plog::plog``.
  8. Result Variables
  9. ^^^^^^^^^^^^^^^^
  10. This module sets the following variables:
  11. ``plog_FOUND``
  12. True, if the library was found.
  13. Cache variables
  14. ^^^^^^^^^^^^^^^
  15. The following cache variables may also be set:
  16. ``plog_INCLUDE_DIR``
  17. Directory containing ``plog/Log.h``.
  18. #]=======================================================================]
  19. include(FindPackageHandleStandardArgs)
  20. find_path(
  21. plog_INCLUDE_DIR
  22. NAMES plog/Log.h
  23. PATHS /usr/include /usr/local/include)
  24. find_package_handle_standard_args(
  25. plog
  26. REQUIRED_VARS plog_INCLUDE_DIR)
  27. mark_as_advanced(plog_INCLUDE_DIR)
  28. if(plog_FOUND)
  29. if(NOT TARGET plog::plog)
  30. add_library(plog::plog INTERFACE IMPORTED)
  31. set_target_properties(plog::plog PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${plog_INCLUDE_DIR}")
  32. endif()
  33. endif()