osquery-1/osquery/events/CMakeLists.txt

58 lines
1.6 KiB
CMake
Raw Normal View History

2014-09-19 08:54:33 +00:00
if(APPLE)
2015-02-03 05:21:36 +00:00
ADD_OSQUERY_LINK(FALSE "-framework CoreServices")
ADD_OSQUERY_LINK(FALSE "-framework SystemConfiguration")
ADD_OSQUERY_LINK(FALSE "-framework IOKit")
ADD_OSQUERY_LINK(FALSE "-framework DiskArbitration")
2014-09-19 08:54:33 +00:00
2015-02-03 05:21:36 +00:00
ADD_OSQUERY_LIBRARY(FALSE osquery_events_darwin
2014-09-23 03:40:28 +00:00
darwin/fsevents.cpp
darwin/iokit_hid.cpp
darwin/diskarbitration.cpp
2014-10-07 22:16:26 +00:00
darwin/scnetwork.cpp
2014-09-23 03:40:28 +00:00
)
2014-11-07 15:33:16 +00:00
elseif(FREEBSD)
2015-02-03 05:21:36 +00:00
ADD_OSQUERY_LIBRARY(FALSE osquery_events_freebsd
2014-11-07 15:33:16 +00:00
)
2014-09-19 08:54:33 +00:00
else()
2015-02-03 05:21:36 +00:00
ADD_OSQUERY_LINK(FALSE "udev")
2015-02-03 05:21:36 +00:00
ADD_OSQUERY_LIBRARY(FALSE osquery_events_linux
2014-09-19 08:54:33 +00:00
linux/inotify.cpp
2014-12-08 10:22:59 +00:00
linux/udev.cpp
2014-09-19 08:54:33 +00:00
)
endif()
2015-02-03 05:21:36 +00:00
ADD_OSQUERY_LIBRARY(TRUE osquery_events
2014-09-19 08:54:33 +00:00
events.cpp
2015-06-30 21:16:43 +00:00
)
2015-06-30 21:20:04 +00:00
file(GLOB OSQUERY_EVENTS_TESTS "tests/*.cpp")
ADD_OSQUERY_TEST(TRUE ${OSQUERY_EVENTS_TESTS})
# Kernel-related userland code.
file(GLOB OSQUERY_EVENTS_KERNEL "kernel/*.cpp")
ADD_OSQUERY_LIBRARY(FALSE osquery_events_kernel
2015-06-30 21:16:43 +00:00
kernel.cpp
${OSQUERY_EVENTS_KERNEL}
2014-09-19 08:54:33 +00:00
)
2015-07-17 20:32:40 +00:00
# Special kernel test define when building non-SDK and non-Release.
if(NOT OSQUERY_BUILD_RELEASE AND NOT OSQUERY_BUILD_SDK_ONLY)
set_target_properties(osquery_events_kernel
PROPERTIES COMPILE_DEFINITIONS "KERNEL_TEST=1")
endif()
file(GLOB OSQUERY_EVENTS_KERNEL_TESTS "kernel/tests/*.cpp")
ADD_OSQUERY_KERNEL_TEST(${OSQUERY_EVENTS_KERNEL_TESTS})
2014-09-19 08:54:33 +00:00
2015-07-23 23:42:46 +00:00
file(GLOB OSQUERY_EVENTS_KERNEL_BENCHMARKS "kernel/benchmarks/*.cpp")
ADD_OSQUERY_KERNEL_BENCHMARK(${OSQUERY_EVENTS_KERNEL_BENCHMARKS})
2014-09-19 08:54:33 +00:00
if(APPLE)
2015-04-27 09:12:58 +00:00
file(GLOB OSQUERY_DARWIN_EVENTS_TESTS "darwin/tests/*.cpp")
ADD_OSQUERY_TEST(FALSE ${OSQUERY_DARWIN_EVENTS_TESTS})
2014-11-16 20:27:45 +00:00
elseif(LINUX)
2015-04-27 09:12:58 +00:00
file(GLOB OSQUERY_LINUX_EVENTS_TESTS "linux/tests/*.cpp")
ADD_OSQUERY_TEST(FALSE ${OSQUERY_LINUX_EVENTS_TESTS})
2014-09-19 08:54:33 +00:00
endif()