find_path(LIBKQUEUE_INCLUDE_DIR sys/event.h
	PATHS
	"/usr/include"
	"/usr/local/include"
	PATH_SUFFIXES "kqueue"
)

find_library(LIBKQUEUE_LIBRARY
	NAMES libkqueue.so
	PATHS /usr/lib /usr/local/lib
)

if (LIBKQUEUE_INCLUDE_DIR AND LIBKQUEUE_LIBRARY)
	set(LIBKQUEUE_FOUND TRUE)
	set(LIBKQUEUE_LIBRARIES ${LIBKQUEUE_LIBRARY})
else (LIBKQUEUE_INCLUDE_DIR AND LIBKQUEUE_LIBRARY)
	set(LIBKQUEUE_FOUND FALSE)
endif (LIBKQUEUE_INCLUDE_DIR AND LIBKQUEUE_LIBRARY)
