From 9c300b83bde7a2b6371f5e8e8bf7756cd94f7f42 Mon Sep 17 00:00:00 2001 From: Klaas Freitag Date: Thu, 23 Jan 2014 16:15:29 +0100 Subject: [PATCH] Add FindINotify cmake module. --- cmake/modules/FindINotify.cmake | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 cmake/modules/FindINotify.cmake diff --git a/cmake/modules/FindINotify.cmake b/cmake/modules/FindINotify.cmake new file mode 100644 index 000000000..dd5dd1b16 --- /dev/null +++ b/cmake/modules/FindINotify.cmake @@ -0,0 +1,19 @@ +# This module defines +# INOTIFY_INCLUDE_DIR, where to find inotify.h, etc. +# 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 + HINTS /usr/include/${CMAKE_LIBRARY_ARCHITECTURE}) +mark_as_advanced(INOTIFY_INCLUDE_DIR) + +# all listed variables are TRUE +# handle the QUIETLY and REQUIRED arguments and set INOTIFY_FOUND to TRUE if +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(INOTIFY DEFAULT_MSG INOTIFY_INCLUDE_DIR) + +IF(INOTIFY_FOUND) + SET(INotify_INCLUDE_DIRS ${INOTIFY_INCLUDE_DIR}) +ENDIF(INOTIFY_FOUND) +