FindINotify.cmake 1.1 KB

123456789101112131415161718192021222324252627282930
  1. # (c) 2014 Copyright ownCloud GmbH
  2. # Redistribution and use is allowed according to the terms of the BSD license.
  3. # For details see the accompanying COPYING* file.
  4. # This module defines
  5. # INOTIFY_INCLUDE_DIR, where to find inotify.h, etc.
  6. # INOTIFY_LIBRARY_DIR, the directory holding the inotify library.
  7. # INOTIFY_FOUND, If false, do not try to use inotify.
  8. # also defined, but not for general use are
  9. # INOTIFY_LIBRARY, where to find the inotify library.
  10. find_path(INOTIFY_INCLUDE_DIR sys/inotify.h
  11. PATH_SUFFIXES inotify)
  12. mark_as_advanced(INOTIFY_INCLUDE_DIR)
  13. find_library(INOTIFY_LIBRARY inotify PATH_SUFFIXES lib/inotify)
  14. get_filename_component(INOTIFY_LIBRARY_DIR ${INOTIFY_LIBRARY} PATH)
  15. mark_as_advanced(INOTIFY_LIBRARY_DIR)
  16. # all listed variables are TRUE
  17. # handle the QUIETLY and REQUIRED arguments and set INOTIFY_FOUND to TRUE if
  18. include(FindPackageHandleStandardArgs)
  19. find_package_handle_standard_args(INOTIFY DEFAULT_MSG INOTIFY_INCLUDE_DIR INOTIFY_LIBRARY_DIR)
  20. IF(INOTIFY_FOUND)
  21. SET(INotify_INCLUDE_DIRS ${INOTIFY_INCLUDE_DIR})
  22. SET(INotify_LIBRARY_DIRS ${INOTIFY_LIBRARY_DIR})
  23. ENDIF(INOTIFY_FOUND)