2017-04-28 20:45:41 +00:00
|
|
|
# Copyright (c) 2014-present, Facebook, Inc.
|
|
|
|
# All rights reserved.
|
|
|
|
#
|
|
|
|
# This source code is licensed under the BSD-style license found in the
|
|
|
|
# LICENSE file in the root directory of this source tree. An additional grant
|
|
|
|
# of patent rights can be found in the PATENTS file in the same directory.
|
|
|
|
|
2017-07-31 18:11:45 +00:00
|
|
|
if(NOT WINDOWS)
|
|
|
|
ADD_OSQUERY_LINK_ADDITIONAL("archive")
|
|
|
|
ADD_OSQUERY_LINK_ADDITIONAL("zstd")
|
|
|
|
else()
|
|
|
|
ADD_OSQUERY_LINK_ADDITIONAL("archive_static")
|
|
|
|
ADD_OSQUERY_LINK_ADDITIONAL("zstd_static")
|
|
|
|
endif()
|
|
|
|
|
2014-08-30 07:15:31 +00:00
|
|
|
if(APPLE)
|
2017-04-28 20:45:41 +00:00
|
|
|
ADD_OSQUERY_LIBRARY(TRUE osquery_filesystem_plist
|
2014-09-05 14:54:41 +00:00
|
|
|
darwin/plist.mm
|
2014-08-30 07:15:31 +00:00
|
|
|
)
|
2014-09-09 17:53:59 +00:00
|
|
|
|
2015-02-03 05:21:36 +00:00
|
|
|
ADD_OSQUERY_LINK(TRUE "-framework Foundation")
|
2015-05-05 20:55:49 +00:00
|
|
|
elseif(FREEBSD)
|
2015-04-04 23:49:17 +00:00
|
|
|
elseif(LINUX)
|
2015-02-03 05:21:36 +00:00
|
|
|
ADD_OSQUERY_LIBRARY(TRUE osquery_filesystem_linux
|
2015-01-19 02:19:35 +00:00
|
|
|
linux/mem.cpp
|
2014-11-19 22:53:42 +00:00
|
|
|
linux/proc.cpp
|
|
|
|
)
|
2014-08-30 07:15:31 +00:00
|
|
|
endif()
|
|
|
|
|
2016-05-31 19:20:38 +00:00
|
|
|
file(GLOB OS_FILEOPS_SOURCE "${PROCESS_FAMILY}/*.cpp")
|
|
|
|
|
2015-02-03 05:21:36 +00:00
|
|
|
ADD_OSQUERY_LIBRARY(TRUE osquery_filesystem
|
2014-09-06 01:12:37 +00:00
|
|
|
filesystem.cpp
|
2016-05-31 19:20:38 +00:00
|
|
|
${OS_FILEOPS_SOURCE}
|
2014-09-06 01:12:37 +00:00
|
|
|
)
|
|
|
|
|
2017-07-31 18:11:45 +00:00
|
|
|
ADD_OSQUERY_LIBRARY_ADDITIONAL(osquery_filesystem_compression
|
|
|
|
file_compression.cpp
|
|
|
|
)
|
|
|
|
|
2015-04-27 09:12:58 +00:00
|
|
|
file(GLOB OSQUERY_FILESYSTEM_TESTS "tests/*.cpp")
|
|
|
|
ADD_OSQUERY_TEST(TRUE ${OSQUERY_FILESYSTEM_TESTS})
|
|
|
|
|
2014-08-13 04:30:30 +00:00
|
|
|
if(APPLE)
|
2015-04-27 09:12:58 +00:00
|
|
|
file(GLOB OSQUERY_DARWIN_FILESYSTEM_TESTS "darwin/tests/*.cpp")
|
|
|
|
ADD_OSQUERY_TEST(TRUE ${OSQUERY_DARWIN_FILESYSTEM_TESTS})
|
2015-09-02 01:56:09 +00:00
|
|
|
|
|
|
|
file(GLOB OSQUERY_DARWIN_FILESYSTEM_BENCHMARKS "darwin/benchmarks/*.cpp")
|
|
|
|
ADD_OSQUERY_BENCHMARK(${OSQUERY_DARWIN_FILESYSTEM_BENCHMARKS})
|
2014-08-13 04:30:30 +00:00
|
|
|
endif()
|