osquery-1/osquery/events/CMakeLists.txt
Sharvil Shah f676ba7642 Implements disk_events and the related publisher and subscriber.
We now have a Publisher to report on disk events and its metadata,
using the DiskArbitration framework on OS X. Currently disk appearance
and disappearance events are published for both physical and
virtual disks (DMG files). On an event trigger, disk properties are
parsed and that metadata is reported along with the action.

The Subscriber subscribes to virtual disk events currently.

This closes #1103.
2015-06-22 11:09:18 -07:00

41 lines
1.0 KiB
CMake

SET(OSQUERY_EVENTS_SOURCES "")
if(APPLE)
ADD_OSQUERY_LINK(FALSE "-framework CoreServices")
ADD_OSQUERY_LINK(FALSE "-framework SystemConfiguration")
ADD_OSQUERY_LINK(FALSE "-framework IOKit")
ADD_OSQUERY_LINK(FALSE "-framework DiskArbitration")
ADD_OSQUERY_LIBRARY(FALSE osquery_events_darwin
darwin/fsevents.cpp
darwin/iokit_hid.cpp
darwin/diskarbitration.cpp
darwin/scnetwork.cpp
)
elseif(FREEBSD)
ADD_OSQUERY_LIBRARY(FALSE osquery_events_freebsd
)
else()
ADD_OSQUERY_LINK(FALSE "udev")
ADD_OSQUERY_LIBRARY(FALSE osquery_events_linux
linux/inotify.cpp
linux/udev.cpp
)
endif()
ADD_OSQUERY_LIBRARY(TRUE osquery_events
events.cpp
)
file(GLOB OSQUERY_EVENTS_TESTS "tests/*.cpp")
ADD_OSQUERY_TEST(TRUE ${OSQUERY_EVENTS_TESTS})
if(APPLE)
file(GLOB OSQUERY_DARWIN_EVENTS_TESTS "darwin/tests/*.cpp")
ADD_OSQUERY_TEST(FALSE ${OSQUERY_DARWIN_EVENTS_TESTS})
elseif(LINUX)
file(GLOB OSQUERY_LINUX_EVENTS_TESTS "linux/tests/*.cpp")
ADD_OSQUERY_TEST(FALSE ${OSQUERY_LINUX_EVENTS_TESTS})
endif()