2014-09-18 14:26:55 +04:00
|
|
|
# (c) 2014 Copyright ownCloud, Inc.
|
|
|
|
# Redistribution and use is allowed according to the terms of the BSD license.
|
|
|
|
# For details see the accompanying COPYING* file.
|
|
|
|
|
2014-01-23 19:15:29 +04:00
|
|
|
# This module defines
|
|
|
|
# INOTIFY_INCLUDE_DIR, where to find inotify.h, etc.
|
2015-08-13 09:44:55 +03:00
|
|
|
# INOTIFY_LIBRARY_DIR, the directory holding the inotify library.
|
2014-01-23 19:15:29 +04:00
|
|
|
# INOTIFY_FOUND, If false, do not try to use inotify.
|
|
|
|
# also defined, but not for general use are
|
|
|
|
# INOTIFY_LIBRARY, where to find the inotify library.
|
|
|
|
|
|
|
|
find_path(INOTIFY_INCLUDE_DIR sys/inotify.h
|
2015-08-13 09:44:55 +03:00
|
|
|
PATH_SUFFIXES inotify)
|
2014-01-23 19:15:29 +04:00
|
|
|
mark_as_advanced(INOTIFY_INCLUDE_DIR)
|
|
|
|
|
2015-08-13 09:44:55 +03:00
|
|
|
find_library(INOTIFY_LIBRARY inotify PATH_SUFFIXES lib/inotify)
|
|
|
|
|
2015-08-14 15:21:40 +03:00
|
|
|
get_filename_component(INOTIFY_LIBRARY_DIR ${INOTIFY_LIBRARY} PATH)
|
2015-08-13 09:44:55 +03:00
|
|
|
mark_as_advanced(INOTIFY_LIBRARY_DIR)
|
|
|
|
|
2014-01-23 19:15:29 +04:00
|
|
|
# all listed variables are TRUE
|
|
|
|
# handle the QUIETLY and REQUIRED arguments and set INOTIFY_FOUND to TRUE if
|
|
|
|
include(FindPackageHandleStandardArgs)
|
2015-08-13 09:44:55 +03:00
|
|
|
find_package_handle_standard_args(INOTIFY DEFAULT_MSG INOTIFY_INCLUDE_DIR INOTIFY_LIBRARY_DIR)
|
2014-01-23 19:15:29 +04:00
|
|
|
|
|
|
|
IF(INOTIFY_FOUND)
|
|
|
|
SET(INotify_INCLUDE_DIRS ${INOTIFY_INCLUDE_DIR})
|
2015-08-13 09:44:55 +03:00
|
|
|
SET(INotify_LIBRARY_DIRS ${INOTIFY_LIBRARY_DIR})
|
2014-01-23 19:15:29 +04:00
|
|
|
ENDIF(INOTIFY_FOUND)
|
|
|
|
|