osquery-1/osquery/filesystem/CMakeLists.txt

51 lines
1.4 KiB
CMake
Raw Normal View History

# 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.
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)
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
)
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
linux/proc.cpp
)
2014-08-30 07:15:31 +00:00
endif()
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
${OS_FILEOPS_SOURCE}
2014-09-06 01:12:37 +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})
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})
file(GLOB OSQUERY_DARWIN_FILESYSTEM_BENCHMARKS "darwin/benchmarks/*.cpp")
ADD_OSQUERY_BENCHMARK(${OSQUERY_DARWIN_FILESYSTEM_BENCHMARKS})
endif()