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")
|
2015-06-22 18:09:15 +00:00
|
|
|
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
|
2014-12-12 02:06:08 +00:00
|
|
|
darwin/iokit_hid.cpp
|
2015-06-22 18:09:15 +00:00
|
|
|
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")
|
2014-12-24 04:07:12 +00:00
|
|
|
|
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})
|
|
|
|
|
2015-07-16 22:23:29 +00:00
|
|
|
# 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
|
2015-07-16 22:23:29 +00:00
|
|
|
${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)
|
2015-07-16 22:23:29 +00:00
|
|
|
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()
|