From b38a8ebaebc6a14a1ba17f36e9cb6e5b8e405c6a Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Fri, 26 Nov 2010 03:09:41 +0100 Subject: Add inotify cmake detection --- Modules/FindInotify.cmake | 11 +++++++++++ libusbmuxd/CMakeLists.txt | 5 +++++ 2 files changed, 16 insertions(+) create mode 100644 Modules/FindInotify.cmake diff --git a/Modules/FindInotify.cmake b/Modules/FindInotify.cmake new file mode 100644 index 0000000..90496d4 --- /dev/null +++ b/Modules/FindInotify.cmake @@ -0,0 +1,11 @@ +set(INOTIFY_H "NOTFOUND") +find_file(INOTIFY_H + "sys/inotify.h" + PATHS ENV INCLUDE +) + +if (INOTIFY_H) + set(INOTIFY_FOUND TRUE) +else() + set(INOTIFY_FOUND FALSE) +endif() diff --git a/libusbmuxd/CMakeLists.txt b/libusbmuxd/CMakeLists.txt index 2f9a07e..402d726 100644 --- a/libusbmuxd/CMakeLists.txt +++ b/libusbmuxd/CMakeLists.txt @@ -1,5 +1,10 @@ include_directories (${CMAKE_SOURCE_DIR}/common) find_package(Threads) +find_package(Inotify) +if (INOTIFY_FOUND) + add_definitions("-DHAVE_INOTIFY") + message("-- libusbmuxd will be built with inotify support") +endif() add_library (libusbmuxd SHARED libusbmuxd.c sock_stuff.c ${CMAKE_SOURCE_DIR}/common/utils.c) find_library (PTHREAD pthread) -- cgit v1.1-32-gdbae