23 lines
1010 B
CMake
23 lines
1010 B
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})
|
|
|
|
add_executable( auditd-plugin-clickhouse auditd-plugin-clickhouse.cpp )
|
|
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 DESTINATION ${SYSCONF_INSTALL_DIR}/audisp )
|