2014-08-30 10:17:52 +00:00
|
|
|
if(APPLE)
|
|
|
|
ADD_LIBRARY(osquery_tables_objc
|
|
|
|
../core/osx/NSProcessInfo+PECocoaBackports.mm
|
|
|
|
system/osx_version.mm
|
|
|
|
)
|
|
|
|
TARGET_LINK_LIBRARIES(osquery_tables_objc "-framework Foundation")
|
|
|
|
SET_TARGET_PROPERTIES(osquery_tables_objc PROPERTIES COMPILE_FLAGS "-x objective-c++ -fobjc-arc")
|
2014-08-30 10:24:35 +00:00
|
|
|
|
|
|
|
ADD_LIBRARY(osquery_tables_osx
|
2014-08-30 10:46:08 +00:00
|
|
|
networking/interfaces.cpp
|
2014-08-30 10:24:35 +00:00
|
|
|
networking/listening_ports.cpp
|
|
|
|
networking/routes.cpp
|
2014-08-30 10:46:08 +00:00
|
|
|
networking/utils.cpp
|
2014-08-30 10:24:35 +00:00
|
|
|
system/apps.cpp
|
|
|
|
system/cacerts.cpp
|
2014-08-30 10:46:08 +00:00
|
|
|
system/firewall.cpp
|
|
|
|
system/kextstat.cpp
|
|
|
|
system/launchd.cpp
|
|
|
|
system/nvram.cpp
|
|
|
|
system/processes.cpp
|
2014-08-30 10:24:35 +00:00
|
|
|
)
|
|
|
|
TARGET_LINK_LIBRARIES(osquery_tables_osx boost_filesystem)
|
|
|
|
TARGET_LINK_LIBRARIES(osquery_tables_osx osquery_database)
|
|
|
|
TARGET_LINK_LIBRARIES(osquery_tables_osx osquery_filesystem)
|
|
|
|
TARGET_LINK_LIBRARIES(osquery_tables_osx "-framework IOKit -framework CoreFoundation -framework Security")
|
2014-08-30 11:28:49 +00:00
|
|
|
SET_TARGET_PROPERTIES(osquery_tables_osx PROPERTIES COMPILE_FLAGS "-std=c++11 -stdlib=libc++")
|
2014-08-30 10:17:52 +00:00
|
|
|
endif()
|
|
|
|
|
2014-08-30 10:43:02 +00:00
|
|
|
FILE(GLOB table_sources
|
|
|
|
"generated/*.cpp"
|
|
|
|
"manual/*.cpp"
|
|
|
|
)
|
|
|
|
|
2014-07-31 00:35:19 +00:00
|
|
|
ADD_LIBRARY(osquery_tables
|
2014-08-05 08:21:28 +00:00
|
|
|
registry.cpp
|
2014-08-05 09:21:24 +00:00
|
|
|
${table_sources}
|
2014-08-30 10:46:08 +00:00
|
|
|
networking/etc_hosts.cpp
|
2014-08-30 07:15:31 +00:00
|
|
|
utility/time.cpp
|
2014-07-31 00:35:19 +00:00
|
|
|
)
|
2014-08-17 08:44:22 +00:00
|
|
|
|
2014-08-04 21:12:06 +00:00
|
|
|
TARGET_LINK_LIBRARIES(osquery_tables glog)
|
2014-07-31 00:35:19 +00:00
|
|
|
TARGET_LINK_LIBRARIES(osquery_tables osquery_sqlite)
|
2014-08-30 10:17:52 +00:00
|
|
|
if(APPLE)
|
|
|
|
TARGET_LINK_LIBRARIES(osquery_tables osquery_tables_objc)
|
2014-08-30 10:24:35 +00:00
|
|
|
TARGET_LINK_LIBRARIES(osquery_tables osquery_tables_osx)
|
2014-08-30 10:17:52 +00:00
|
|
|
endif()
|
2014-08-30 11:28:49 +00:00
|
|
|
TARGET_LINK_LIBRARIES(osquery_tables "-Wl,-all_load")
|
2014-08-30 07:15:31 +00:00
|
|
|
SET_TARGET_PROPERTIES(osquery_tables PROPERTIES COMPILE_FLAGS "-std=c++11 -stdlib=libc++")
|
2014-08-02 03:46:22 +00:00
|
|
|
|
2014-08-06 01:10:18 +00:00
|
|
|
ADD_EXECUTABLE(etc_hosts_tests networking/etc_hosts_tests.cpp)
|
2014-08-02 03:46:22 +00:00
|
|
|
TARGET_LINK_LIBRARIES(etc_hosts_tests glog)
|
2014-08-30 21:26:24 +00:00
|
|
|
TARGET_LINK_LIBRARIES(etc_hosts_tests gtest)
|
2014-08-02 03:46:22 +00:00
|
|
|
TARGET_LINK_LIBRARIES(etc_hosts_tests osquery_core)
|
2014-08-07 20:14:06 +00:00
|
|
|
TARGET_LINK_LIBRARIES(etc_hosts_tests osquery_database)
|
2014-08-04 21:12:06 +00:00
|
|
|
TARGET_LINK_LIBRARIES(etc_hosts_tests osquery_filesystem)
|
2014-08-02 03:46:22 +00:00
|
|
|
TARGET_LINK_LIBRARIES(etc_hosts_tests osquery_tables)
|
2014-08-30 07:15:31 +00:00
|
|
|
SET_TARGET_PROPERTIES(etc_hosts_tests PROPERTIES COMPILE_FLAGS "-std=c++11 -stdlib=libc++")
|
2014-08-30 21:26:24 +00:00
|
|
|
|
|
|
|
if(APPLE)
|
|
|
|
ADD_EXECUTABLE(apps_tests system/apps_tests.cpp)
|
|
|
|
TARGET_LINK_LIBRARIES(apps_tests glog)
|
|
|
|
TARGET_LINK_LIBRARIES(apps_tests gtest)
|
|
|
|
TARGET_LINK_LIBRARIES(apps_tests osquery_core)
|
|
|
|
TARGET_LINK_LIBRARIES(apps_tests osquery_filesystem)
|
|
|
|
TARGET_LINK_LIBRARIES(apps_tests osquery_tables)
|
|
|
|
SET_TARGET_PROPERTIES(apps_tests PROPERTIES COMPILE_FLAGS "-std=c++11 -stdlib=libc++")
|
|
|
|
|
|
|
|
ADD_EXECUTABLE(cacerts_tests system/cacerts_tests.cpp)
|
|
|
|
TARGET_LINK_LIBRARIES(cacerts_tests glog)
|
|
|
|
TARGET_LINK_LIBRARIES(cacerts_tests gtest)
|
|
|
|
TARGET_LINK_LIBRARIES(cacerts_tests osquery_core)
|
|
|
|
TARGET_LINK_LIBRARIES(cacerts_tests osquery_filesystem)
|
|
|
|
TARGET_LINK_LIBRARIES(cacerts_tests osquery_tables)
|
|
|
|
SET_TARGET_PROPERTIES(cacerts_tests PROPERTIES COMPILE_FLAGS "-std=c++11 -stdlib=libc++")
|
|
|
|
|
|
|
|
ADD_EXECUTABLE(firewall_tests system/firewall_tests.cpp)
|
|
|
|
TARGET_LINK_LIBRARIES(firewall_tests glog)
|
|
|
|
TARGET_LINK_LIBRARIES(firewall_tests gtest)
|
|
|
|
TARGET_LINK_LIBRARIES(firewall_tests osquery_core)
|
|
|
|
TARGET_LINK_LIBRARIES(firewall_tests osquery_filesystem)
|
|
|
|
TARGET_LINK_LIBRARIES(firewall_tests osquery_tables)
|
|
|
|
SET_TARGET_PROPERTIES(firewall_tests PROPERTIES COMPILE_FLAGS "-std=c++11 -stdlib=libc++")
|
|
|
|
|
|
|
|
ADD_EXECUTABLE(launchd_tests system/launchd_tests.cpp)
|
|
|
|
TARGET_LINK_LIBRARIES(launchd_tests glog)
|
|
|
|
TARGET_LINK_LIBRARIES(launchd_tests gtest)
|
|
|
|
TARGET_LINK_LIBRARIES(launchd_tests osquery_core)
|
|
|
|
TARGET_LINK_LIBRARIES(launchd_tests osquery_filesystem)
|
|
|
|
TARGET_LINK_LIBRARIES(launchd_tests osquery_tables)
|
|
|
|
SET_TARGET_PROPERTIES(launchd_tests PROPERTIES COMPILE_FLAGS "-std=c++11 -stdlib=libc++")
|
|
|
|
endif()
|