$OpenBSD: patch-cmake_modules_FindINotify_cmake,v 1.1.1.1 2015/07/30 06:14:14 kirby Exp $
--- cmake/modules/FindINotify.cmake.orig	Mon Mar 16 17:28:58 2015
+++ cmake/modules/FindINotify.cmake	Sat Apr  4 19:07:13 2015
@@ -4,20 +4,27 @@
 
 # This module defines
 #  INOTIFY_INCLUDE_DIR, where to find inotify.h, etc.
+#  INOTIFY_LIBRARY_DIR, the directory holding the inotify library.
 #  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})
+          PATH_SUFFIXES inotify)
 mark_as_advanced(INOTIFY_INCLUDE_DIR)
 
+find_library(INOTIFY_LIBRARY inotify PATH_SUFFIXES lib/inotify)
+
+get_filename_component(INOTIFY_LIBRARY_DIR ${INOTIFY_LIBRARY} DIRECTORY)
+mark_as_advanced(INOTIFY_LIBRARY_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)
+find_package_handle_standard_args(INOTIFY DEFAULT_MSG INOTIFY_INCLUDE_DIR INOTIFY_LIBRARY_DIR)
 
 IF(INOTIFY_FOUND)
   SET(INotify_INCLUDE_DIRS ${INOTIFY_INCLUDE_DIR})
+  SET(INotify_LIBRARY_DIRS ${INOTIFY_LIBRARY_DIR})
 ENDIF(INOTIFY_FOUND)
 
