32 lines
1.1 KiB
CMake
32 lines
1.1 KiB
CMake
cmake_minimum_required( VERSION 3.13.4 )
|
|
|
|
project(auditd-plugin-clickhouse
|
|
LANGUAGES CXX)
|
|
|
|
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
|
|
|
set(SYSCONF_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/etc CACHE PATH "Installation prefix for configuration files")
|
|
set(BIN_INSTALL_LIBEXEC ${CMAKE_INSTALL_PREFIX}/libexec CACHE PATH "Installation prefix for user executables")
|
|
|
|
find_package(Boost REQUIRED)
|
|
find_package(ClickhouseCpp REQUIRED)
|
|
pkg_check_modules(AUPARSE auparse REQUIRED)
|
|
|
|
include_directories(${Boost_INCLUDE_DIRS} ${AUPARSE_INCLUDE_DIRS})
|
|
|
|
set(SOURCES
|
|
auditd-datatypes.cpp
|
|
auditd-plugin-clickhouse.cpp
|
|
auditd-record.cpp)
|
|
|
|
set(HEADERS
|
|
auditd-datatypes.hpp
|
|
auditd-record.hpp)
|
|
|
|
add_executable( auditd-plugin-clickhouse ${SOURCES} ${HEADERS} )
|
|
target_link_libraries( auditd-plugin-clickhouse ${CLICKHOUSECPP_LIBRARIES} ${AUPARSE_LIBRARIES} )
|
|
|
|
install(TARGETS auditd-plugin-clickhouse RUNTIME DESTINATION ${BIN_INSTALL_LIBEXEC} )
|
|
install(FILES auditd-plugin-clickhouse.conf DESTINATION ${SYSCONF_INSTALL_DIR}/audisp/plugins.d )
|
|
install(FILES auditd-clickhouse.conf auditd-clickhouse-datatypes.json DESTINATION ${SYSCONF_INSTALL_DIR}/audisp )
|