osquery-1/osquery/tables/CMakeLists.txt

87 lines
2.3 KiB
CMake
Raw Normal View History

2014-09-06 01:12:37 +00:00
SET(OSQUERY_CORE_TABLE_TARGETS "")
if(APPLE)
2014-09-06 01:12:37 +00:00
ADD_LIBRARY(osquery_tables_objc OBJECT
2014-09-05 14:54:41 +00:00
../core/darwin/NSProcessInfo+PECocoaBackports.mm
system/darwin/osx_version.mm
)
2014-09-06 01:12:37 +00:00
ADD_OSQUERY_LINK("-framework Foundation")
SET_OSQUERY_COMPILE(osquery_tables_objc "-x objective-c++ -fobjc-arc")
list(APPEND OSQUERY_CORE_TABLE_TARGETS $<TARGET_OBJECTS:osquery_tables_objc>)
ADD_LIBRARY(osquery_tables_darwin OBJECT
networking/interfaces.cpp
networking/listening_ports.cpp
networking/routes.cpp
networking/utils.cpp
2014-09-05 14:54:41 +00:00
system/darwin/apps.cpp
system/darwin/ca_certs.cpp
system/darwin/firewall.cpp
system/darwin/kextstat.cpp
system/darwin/launchd.cpp
system/darwin/nvram.cpp
system/processes.cpp
2014-09-04 22:20:28 +00:00
system/last.cpp
)
2014-09-06 01:12:37 +00:00
ADD_OSQUERY_LINK("-framework IOKit")
ADD_OSQUERY_LINK("-framework CoreFoundation")
ADD_OSQUERY_LINK("-framework Security")
SET_OSQUERY_COMPILE(osquery_tables_darwin)
LIST(APPEND OSQUERY_CORE_TABLE_TARGETS $<TARGET_OBJECTS:osquery_tables_darwin>)
2014-09-05 14:54:41 +00:00
else()
2014-09-06 01:12:37 +00:00
ADD_LIBRARY(osquery_tables_linux OBJECT
2014-09-05 14:54:41 +00:00
system/linux/kernel_modules.cpp
)
2014-09-06 01:12:37 +00:00
SET_OSQUERY_COMPILE(osquery_tables_linux)
LIST(APPEND OSQUERY_CORE_TABLE_TARGETS $<TARGET_OBJECTS:osquery_tables_linux>)
endif()
2014-09-06 01:12:37 +00:00
# Add the targets from above to libosquery (may change with plugins)
ADD_OSQUERY_LIB("${OSQUERY_CORE_TABLE_TARGETS}")
FILE(GLOB table_sources
"generated/*.cpp"
"manual/*.cpp"
)
2014-09-06 01:12:37 +00:00
ADD_LIBRARY(osquery_tables OBJECT
2014-08-05 09:21:24 +00:00
${table_sources}
networking/etc_hosts.cpp
2014-08-30 07:15:31 +00:00
utility/time.cpp
2014-07-31 00:35:19 +00:00
)
2014-09-06 01:12:37 +00:00
SET_OSQUERY_COMPILE(osquery_tables)
2014-09-07 00:29:56 +00:00
ADD_LIBRARY(osquery_tables_testing
2014-09-06 01:12:37 +00:00
$<TARGET_OBJECTS:osquery_core>
$<TARGET_OBJECTS:osquery_sqlite>
$<TARGET_OBJECTS:osquery_registry>
$<TARGET_OBJECTS:osquery_filesystem>
$<TARGET_OBJECTS:osquery_tables>
${OSQUERY_CORE_TABLE_TARGETS}
${OSQUERY_LIB_ADDITIONAL_OBJECTS}
)
2014-09-07 00:29:56 +00:00
ADD_OSQUERY_TEST(etc_hosts_tests networking/etc_hosts_tests.cpp
2014-09-06 01:12:37 +00:00
osquery_tables_testing)
2014-08-30 21:26:24 +00:00
if(APPLE)
2014-09-06 01:12:37 +00:00
ADD_OSQUERY_TEST(apps_tests system/darwin/apps_tests.cpp
osquery_tables_testing)
ADD_OSQUERY_TEST(ca_certs_tests system/darwin/ca_certs_tests.cpp
osquery_tables_testing)
ADD_OSQUERY_TEST(firewall_tests system/darwin/firewall_tests.cpp
osquery_tables_testing)
ADD_OSQUERY_TEST(launchd_tests system/darwin/launchd_tests.cpp
osquery_tables_testing)
2014-08-30 21:26:24 +00:00
endif()