2014-11-28 15:22:27 +01:00
|
|
|
cmake_minimum_required (VERSION 2.8)
|
|
|
|
|
2014-11-28 15:58:12 +01:00
|
|
|
# cmake versions:
|
2014-11-28 15:22:27 +01:00
|
|
|
# Debian 6 - 2.8.2
|
|
|
|
# Debian 7 - 2.8.9
|
|
|
|
# CentOS 6 - 2.8.12
|
|
|
|
|
|
|
|
project(FastNetMon)
|
|
|
|
|
2015-06-04 22:54:29 +02:00
|
|
|
# Unfortunately, Debian Squeeze haven't support for this feature
|
|
|
|
# It added in 2.8.5 release: http://www.cmake.org/cmake/help/v2.8.5/cmake.html
|
2015-06-04 15:13:22 +02:00
|
|
|
# Get convinient paths for all system folders: http://www.cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a262fe09
|
2015-06-04 22:54:29 +02:00
|
|
|
# include(GNUInstallDirs)
|
2015-06-04 15:13:22 +02:00
|
|
|
|
2015-03-22 22:30:51 +01:00
|
|
|
# Enable it and fix all warnigns!
|
|
|
|
# add_definitions ("-Wall")
|
|
|
|
|
2014-11-28 15:22:27 +01:00
|
|
|
set (Tutorial_VERSION_MAJOR 1)
|
2014-11-28 15:58:12 +01:00
|
|
|
set (Tutorial_VERSION_MINOR 1)
|
2014-11-28 15:22:27 +01:00
|
|
|
|
2014-12-18 11:23:56 +01:00
|
|
|
# It's pretty safe and provide big speedup for our packet processor and patricia code
|
2015-06-02 22:25:30 +02:00
|
|
|
set(CMAKE_C_FLAGS_RELEASE "-O2")
|
|
|
|
set(CMAKE_CXX_FLAGS_RELEASE "-O2")
|
2014-12-18 11:23:56 +01:00
|
|
|
|
2015-06-14 23:45:32 +02:00
|
|
|
# If you want C++ 11 support, please uncomment it
|
|
|
|
# set(CMAKE_CXX_FLAGS_RELEASE "-std=c++11")
|
|
|
|
|
2014-12-19 09:42:10 +01:00
|
|
|
set(FASTNETMON_PROFILER OFF)
|
|
|
|
|
|
|
|
set(FASTNETMON_PROFILE_FLAGS "-g -pg")
|
|
|
|
|
2015-06-03 11:27:17 +02:00
|
|
|
if (NOT CMAKE_BUILD_TYPE)
|
|
|
|
message(STATUS "Setting build type to Release as none was specified.")
|
|
|
|
set(CMAKE_BUILD_TYPE Release)
|
|
|
|
endif()
|
|
|
|
|
2014-12-19 09:42:10 +01:00
|
|
|
if (FASTNETMON_PROFILER)
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${FASTNETMON_PROFILE_FLAGS}")
|
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${FASTNETMON_PROFILE_FLAGS}")
|
|
|
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${FASTNETMON_PROFILE_FLAGS}")
|
|
|
|
endif()
|
|
|
|
|
2015-06-04 13:08:25 +02:00
|
|
|
set(FASTNETMON_APPLICATION_VERSION "1.1.3 master")
|
|
|
|
configure_file(fast_platform.h.template "${PROJECT_SOURCE_DIR}/fast_platform.h")
|
|
|
|
|
2015-01-24 16:23:08 +01:00
|
|
|
# With this flag we can diable PF_RING build via console: cmake .. -DDISABLE_PF_RING_SUPPORT=ON
|
|
|
|
if (NOT DISABLE_PF_RING_SUPPORT)
|
|
|
|
if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
2015-06-03 11:27:17 +02:00
|
|
|
message(STATUS "You are running Linux and we can build PF_RING support")
|
2015-01-24 16:23:08 +01:00
|
|
|
set (ENABLE_PFRING_SUPPORT ON)
|
|
|
|
else()
|
2015-06-03 11:27:17 +02:00
|
|
|
message(WARNING "You are running not an Linux and we can't build PF_RING support")
|
2015-01-24 16:23:08 +01:00
|
|
|
endif()
|
|
|
|
endif()
|
2014-11-28 15:58:12 +01:00
|
|
|
|
2015-01-24 16:23:08 +01:00
|
|
|
if (ENABLE_PFRING_SUPPORT)
|
2015-03-24 12:04:18 +01:00
|
|
|
# work around for broken 6.0.3 (which in reality very old 6.0.3) from ntop packages
|
2015-03-24 13:27:45 +01:00
|
|
|
#if (WE_USE_PFRING_FROM_NTOP)
|
|
|
|
# add_definitions(-DWE_USE_PFRING_FROM_NTOP)
|
|
|
|
#endif()
|
2015-03-24 12:04:18 +01:00
|
|
|
|
|
|
|
if (WE_USE_PFRING_FROM_NTOP)
|
|
|
|
# Because ntop will add libs and headers to global paths
|
2015-03-24 12:31:11 +01:00
|
|
|
set(PFRING_LIBRARIES pfring)
|
2015-03-24 12:04:18 +01:00
|
|
|
else()
|
|
|
|
# Set path to manually compiled PF_RING
|
|
|
|
set(PFRING_INCLUDE_DIRS /opt/pf_ring/include)
|
|
|
|
set(PFRING_LIBRARIES /opt/pf_ring/lib/libpfring.so)
|
|
|
|
endif()
|
|
|
|
|
2015-01-09 23:43:23 +01:00
|
|
|
add_definitions(-DPF_RING)
|
2015-02-03 20:55:44 +01:00
|
|
|
|
2015-03-24 13:25:43 +01:00
|
|
|
if (EXISTS "/opt/pf_ring/include/pfring_zc.h" OR EXISTS "/usr/local/include/pfring_zc.h")
|
2015-06-03 11:27:17 +02:00
|
|
|
message(STATUS "We found PF_RING ZC headers and will build PF_RING ZC support")
|
2015-02-24 17:53:41 +01:00
|
|
|
# Enable ZC support
|
|
|
|
add_definitions(-DPF_RING_ZC)
|
|
|
|
else()
|
2015-06-03 11:27:17 +02:00
|
|
|
message(WARNING "We can't find PF_RING ZC header pfring_zc.h in folder /opt/pf_ring/include. Will not compile ZC support")
|
2015-02-24 17:53:41 +01:00
|
|
|
endif()
|
|
|
|
|
2015-02-03 20:55:44 +01:00
|
|
|
include_directories(${PFRING_INCLUDE_DIRS})
|
2015-01-09 23:43:23 +01:00
|
|
|
endif()
|
|
|
|
|
2014-12-03 15:56:08 +01:00
|
|
|
# If you need hardware locking features
|
|
|
|
# add_definitions(-DHWFILTER_LOCKING)
|
|
|
|
|
2014-11-28 15:58:12 +01:00
|
|
|
# Our LPM library
|
2014-12-16 09:01:07 +01:00
|
|
|
add_library(patricia STATIC libpatricia/patricia.c)
|
2014-11-28 15:22:27 +01:00
|
|
|
|
2015-03-21 11:47:25 +01:00
|
|
|
# Our tools library
|
|
|
|
add_library(fast_library STATIC fast_library.cpp)
|
|
|
|
|
2015-03-22 17:00:16 +01:00
|
|
|
# Our ipfix database library
|
|
|
|
add_library(ipfix_rfc STATIC ipfix_rfc.cpp)
|
|
|
|
|
2015-03-10 15:18:52 +01:00
|
|
|
# Our packet parser
|
2015-03-21 12:56:44 +01:00
|
|
|
add_library(fastnetmon_packet_parser STATIC fastnetmon_packet_parser.c)
|
2015-03-10 15:18:52 +01:00
|
|
|
|
2015-01-26 10:10:35 +01:00
|
|
|
# sFLOW plugin
|
2014-12-01 22:08:38 +01:00
|
|
|
add_library(sflow_plugin STATIC sflow_plugin/sflow_collector.cpp)
|
2014-12-01 21:26:08 +01:00
|
|
|
|
2015-01-26 10:10:35 +01:00
|
|
|
# netflow plugin
|
2015-01-23 17:49:37 +01:00
|
|
|
add_library(netflow_plugin STATIC netflow_plugin/netflow_collector.cpp)
|
2015-03-22 17:00:16 +01:00
|
|
|
target_link_libraries(netflow_plugin ipfix_rfc)
|
2015-01-23 17:49:37 +01:00
|
|
|
|
2015-06-22 10:19:04 +02:00
|
|
|
# We do not enable it by default, it's testing feature
|
|
|
|
# If you want it please build with:
|
|
|
|
# cmake -DENABLE_LUA_SUPPORT=ON ..
|
|
|
|
if (ENABLE_LUA_SUPPORT)
|
2015-07-03 17:01:18 +02:00
|
|
|
message(STATUS "We will enable LuaJIT support")
|
|
|
|
|
2015-06-22 10:19:04 +02:00
|
|
|
add_definitions(-DENABLE_LUA_HOOKS)
|
|
|
|
|
|
|
|
target_link_libraries(netflow_plugin luajit-5.1)
|
2015-07-03 17:01:18 +02:00
|
|
|
target_link_libraries(sflow_plugin luajit-5.1)
|
|
|
|
target_link_libraries(fast_library luajit-5.1)
|
|
|
|
|
2015-06-22 10:19:04 +02:00
|
|
|
endif()
|
|
|
|
|
2015-01-26 14:37:12 +01:00
|
|
|
# pcap plugin
|
|
|
|
add_library(pcap_plugin STATIC pcap_plugin/pcap_collector.cpp)
|
2015-02-01 14:02:16 +01:00
|
|
|
target_link_libraries(pcap_plugin pcap)
|
2015-01-26 14:37:12 +01:00
|
|
|
|
2015-06-02 22:27:49 +02:00
|
|
|
find_package(Threads)
|
|
|
|
|
2015-02-03 20:55:44 +01:00
|
|
|
if (ENABLE_PFRING_SUPPORT)
|
|
|
|
add_library(pfring_plugin STATIC pfring_plugin/pfring_collector.cpp)
|
|
|
|
target_link_libraries(pfring_plugin ${PFRING_LIBRARIES})
|
|
|
|
target_link_libraries(pfring_plugin numa)
|
2015-06-02 22:27:49 +02:00
|
|
|
target_link_libraries(pfring_plugin ${CMAKE_THREAD_LIBS_INIT})
|
2015-02-03 20:55:44 +01:00
|
|
|
endif()
|
|
|
|
|
2015-01-26 10:10:35 +01:00
|
|
|
# example plugin
|
|
|
|
add_library(example_plugin STATIC example_plugin/example_collector.cpp)
|
|
|
|
|
2015-03-10 15:18:52 +01:00
|
|
|
# Netmap plugin
|
|
|
|
set(NETMAP_INCLUDE_DIRS "netmap_plugin/netmap_includes")
|
|
|
|
include_directories(${NETMAP_INCLUDE_DIRS})
|
|
|
|
add_library(netmap_plugin STATIC netmap_plugin/netmap_collector.cpp)
|
2015-03-10 15:22:24 +01:00
|
|
|
target_link_libraries(netmap_plugin fastnetmon_packet_parser)
|
2015-03-10 15:18:52 +01:00
|
|
|
|
2014-11-28 15:58:12 +01:00
|
|
|
# Main tool
|
2014-11-28 15:22:27 +01:00
|
|
|
add_executable(fastnetmon fastnetmon.cpp)
|
|
|
|
|
2014-12-22 16:39:46 +01:00
|
|
|
# Client tool
|
|
|
|
add_executable(fastnetmon_client fastnetmon_client.cpp)
|
|
|
|
|
2014-11-28 15:22:27 +01:00
|
|
|
# Find boost: http://www.cmake.org/cmake/help/v3.0/module/FindBoost.html
|
2014-12-01 09:09:37 +01:00
|
|
|
|
|
|
|
# Enable detailed errors
|
2014-11-28 15:58:12 +01:00
|
|
|
set(Boost_DETAILED_FAILURE_MSG ON)
|
2014-12-01 09:09:37 +01:00
|
|
|
|
2015-02-01 13:54:05 +01:00
|
|
|
find_package(Boost COMPONENTS thread regex system REQUIRED)
|
2014-11-28 15:58:12 +01:00
|
|
|
|
2014-11-28 15:22:27 +01:00
|
|
|
if(Boost_FOUND)
|
|
|
|
include_directories(${Boost_INCLUDE_DIRS})
|
|
|
|
target_link_libraries(fastnetmon ${Boost_LIBRARIES})
|
2015-03-21 13:15:35 +01:00
|
|
|
target_link_libraries(fast_library ${Boost_LIBRARIES})
|
2014-11-28 15:22:27 +01:00
|
|
|
endif()
|
|
|
|
|
2015-05-29 14:45:02 +02:00
|
|
|
target_link_libraries(fast_library patricia)
|
|
|
|
|
2015-05-07 09:13:05 +02:00
|
|
|
# Try to find ncurses librreary
|
2014-11-28 15:58:12 +01:00
|
|
|
find_package(Curses REQUIRED)
|
|
|
|
|
|
|
|
if(CURSES_FOUND)
|
|
|
|
include_directories(${CURSES_INCLUDE_DIRS})
|
2014-12-22 16:39:46 +01:00
|
|
|
target_link_libraries(fastnetmon_client ${CURSES_LIBRARIES})
|
2014-11-28 15:58:12 +01:00
|
|
|
endif()
|
|
|
|
|
2015-03-19 10:40:58 +01:00
|
|
|
# apt-get install -y libhiredis-dev
|
2015-05-07 09:13:05 +02:00
|
|
|
# yum install -y hiredis-devel
|
2015-04-13 11:30:20 +02:00
|
|
|
# Please uncomment this lines if you want enable Redis support
|
2015-07-04 12:01:42 +02:00
|
|
|
#list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
|
|
|
|
#find_package(Hiredis QUIET)
|
2015-03-19 10:40:58 +01:00
|
|
|
#if (HIREDIS_FOUND)
|
2015-07-04 12:01:42 +02:00
|
|
|
# message(STATUS "We could compile Redis support")
|
2015-03-19 10:40:58 +01:00
|
|
|
# add_definitions(-DREDIS)
|
|
|
|
# include_directories(${HIREDIS_INCLUDE_DIRS})
|
|
|
|
# target_link_libraries (fastnetmon ${HIREDIS_LIBRARIES})
|
|
|
|
#endif()
|
2015-07-14 16:02:18 +02:00
|
|
|
# For CentOS 6 please use this code:
|
|
|
|
# add_definitions(-DREDIS)
|
|
|
|
# target_link_libraries (fastnetmon hiredis)
|
2015-03-19 10:40:58 +01:00
|
|
|
|
2015-02-10 11:42:48 +01:00
|
|
|
# Standard path for Linux
|
|
|
|
set(LOG4CPP_LIBRARY_PATH log4cpp)
|
|
|
|
|
|
|
|
# Non standard path on platforms where we compile log4cpp from sources
|
|
|
|
if (WE_USE_CUSTOM_LOG4CPP)
|
|
|
|
set(LOG4CPP_LIBRARY_PATH /opt/log4cpp1.1.1/lib/liblog4cpp.so)
|
|
|
|
include_directories(/opt/log4cpp1.1.1/include)
|
|
|
|
endif()
|
|
|
|
|
2015-02-10 14:07:53 +01:00
|
|
|
# Try to find log4cpp library where it installed by mac ports
|
2015-02-10 11:42:48 +01:00
|
|
|
if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
|
2015-02-10 14:03:21 +01:00
|
|
|
FIND_LIBRARY(LOG4_CPP_LIRBARY_FOUNDER log4cpp /opt/local/lib REQUIRED)
|
|
|
|
set(LOG4CPP_LIBRARY_PATH ${LOG4_CPP_LIRBARY_FOUNDER})
|
2015-01-29 11:27:55 +01:00
|
|
|
endif()
|
|
|
|
|
2015-04-24 12:54:48 +02:00
|
|
|
# Try to find log4cpp library where it installed by FreeBSD's and Dragonfly's pkg
|
|
|
|
if (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD" OR ${CMAKE_SYSTEM_NAME} STREQUAL "DragonFly")
|
2015-02-10 14:07:53 +01:00
|
|
|
FIND_LIBRARY(LOG4_CPP_LIRBARY_FOUNDER log4cpp /usr/local/lib REQUIRED)
|
|
|
|
set(LOG4CPP_LIBRARY_PATH ${LOG4_CPP_LIRBARY_FOUNDER})
|
|
|
|
endif()
|
|
|
|
|
2015-02-10 11:42:48 +01:00
|
|
|
target_link_libraries(fastnetmon ${LOG4CPP_LIBRARY_PATH})
|
|
|
|
|
2015-06-02 22:27:49 +02:00
|
|
|
target_link_libraries(fastnetmon ${CMAKE_THREAD_LIBS_INIT})
|
2014-11-28 15:22:27 +01:00
|
|
|
|
2015-07-03 17:01:18 +02:00
|
|
|
if (ENABLE_LUA_SUPPORT)
|
|
|
|
target_link_libraries(fast_library luajit-5.1)
|
|
|
|
target_link_libraries(fastnetmon luajit-5.1)
|
|
|
|
endif()
|
|
|
|
|
2014-11-28 15:58:12 +01:00
|
|
|
# Our libs
|
2014-12-16 09:01:07 +01:00
|
|
|
target_link_libraries(fastnetmon patricia)
|
2014-11-28 15:22:27 +01:00
|
|
|
|
2015-03-22 17:00:16 +01:00
|
|
|
target_link_libraries(fastnetmon ipfix_rfc)
|
|
|
|
|
2015-03-21 11:47:25 +01:00
|
|
|
# Link to our functions
|
|
|
|
target_link_libraries(fastnetmon fast_library)
|
|
|
|
|
2015-02-03 20:55:44 +01:00
|
|
|
if (ENABLE_PFRING_SUPPORT)
|
|
|
|
target_link_libraries(fastnetmon pfring_plugin)
|
|
|
|
endif()
|
|
|
|
|
2015-05-29 13:42:01 +02:00
|
|
|
target_link_libraries(fastnetmon sflow_plugin netflow_plugin pcap_plugin example_plugin netmap_plugin)
|
|
|
|
|
|
|
|
# cmake .. -DBUILD_PLUGIN_RUNNER=ON
|
|
|
|
if (BUILD_PLUGIN_RUNNER)
|
|
|
|
add_executable(fastnetmon_plugin_runner plugin_runner.cpp)
|
|
|
|
|
2015-06-16 17:00:10 +02:00
|
|
|
target_link_libraries(fastnetmon_plugin_runner ${CMAKE_THREAD_LIBS_INIT})
|
2015-05-29 13:42:01 +02:00
|
|
|
target_link_libraries(fastnetmon_plugin_runner patricia)
|
|
|
|
target_link_libraries(fastnetmon_plugin_runner ${LOG4CPP_LIBRARY_PATH})
|
|
|
|
target_link_libraries(fastnetmon_plugin_runner fast_library)
|
|
|
|
|
|
|
|
# Add all plugins
|
|
|
|
target_link_libraries(fastnetmon_plugin_runner sflow_plugin netflow_plugin pcap_plugin example_plugin netmap_plugin)
|
|
|
|
|
|
|
|
if (ENABLE_PFRING_SUPPORT)
|
|
|
|
target_link_libraries(fastnetmon_plugin_runner ${PFRING_LIBRARIES})
|
|
|
|
target_link_libraries(fastnetmon_plugin_runner pfring_plugin)
|
|
|
|
endif()
|
|
|
|
endif()
|
2015-03-23 17:39:44 +01:00
|
|
|
|
2015-05-29 14:08:12 +02:00
|
|
|
# cmake .. -DBUILD_PCAP_READER=ON
|
|
|
|
if (BUILD_PCAP_READER)
|
|
|
|
add_executable(fastnetmon_pcap_reader pcap_reader.cpp)
|
|
|
|
|
2015-05-29 14:45:02 +02:00
|
|
|
target_link_libraries(fastnetmon_pcap_reader fastnetmon_packet_parser)
|
2015-05-29 14:08:12 +02:00
|
|
|
target_link_libraries(fastnetmon_pcap_reader patricia)
|
|
|
|
target_link_libraries(fastnetmon_pcap_reader fast_library)
|
|
|
|
target_link_libraries(fastnetmon_pcap_reader ${LOG4CPP_LIBRARY_PATH})
|
2015-06-17 12:35:42 +02:00
|
|
|
target_link_libraries(fastnetmon_pcap_reader netflow_plugin)
|
|
|
|
target_link_libraries(fastnetmon_pcap_reader sflow_plugin)
|
2015-05-29 14:08:12 +02:00
|
|
|
endif()
|
2015-03-23 17:39:44 +01:00
|
|
|
|
2015-07-12 17:34:00 +02:00
|
|
|
# cmake -DBUILD_TESTS=ON ..
|
|
|
|
if (BUILD_TESTS)
|
|
|
|
add_executable(fastnetmon_tests fastnetmon_tests.cpp)
|
|
|
|
target_link_libraries(fastnetmon_tests fast_library)
|
|
|
|
target_link_libraries(fastnetmon_tests ${CMAKE_THREAD_LIBS_INIT})
|
|
|
|
target_link_libraries(fastnetmon_tests ${Boost_LIBRARIES})
|
2015-07-13 10:05:26 +02:00
|
|
|
target_link_libraries(fastnetmon_tests ${LOG4CPP_LIBRARY_PATH})
|
|
|
|
|
|
|
|
set(GOOGLE_TEST_INCLUDE_DIRS /opt/gtest/include)
|
|
|
|
set(GOOGLE_TEST_LIBRARIES /opt/gtest/lib/libgtest.a /opt/gtest/lib/libgtest_main.a)
|
2015-07-12 17:34:00 +02:00
|
|
|
|
|
|
|
# Compiled Google Library
|
2015-07-13 10:05:26 +02:00
|
|
|
include_directories(${GOOGLE_TEST_INCLUDE_DIRS})
|
|
|
|
target_link_libraries(fastnetmon_tests ${GOOGLE_TEST_LIBRARIES})
|
2015-07-12 17:34:00 +02:00
|
|
|
endif()
|
|
|
|
|
2015-06-04 17:13:43 +02:00
|
|
|
if (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD" OR ${CMAKE_SYSTEM_NAME} STREQUAL "DragonFly")
|
|
|
|
install(TARGETS fastnetmon DESTINATION bin)
|
|
|
|
install(TARGETS fastnetmon_client DESTINATION bin)
|
|
|
|
|
|
|
|
install(FILES fastnetmon.conf DESTINATION etc)
|
2015-05-30 20:45:28 +02:00
|
|
|
|
2015-06-04 17:13:43 +02:00
|
|
|
# Install blank files for networks list and whitelist
|
|
|
|
install(FILES networks_list DESTINATION etc)
|
|
|
|
install(FILES networks_whitelist DESTINATION etc)
|
|
|
|
else()
|
|
|
|
# Linux
|
|
|
|
install(TARGETS fastnetmon DESTINATION /usr/sbin)
|
|
|
|
install(TARGETS fastnetmon_client DESTINATION /usr/bin)
|
2015-06-02 22:26:04 +02:00
|
|
|
|
2015-06-04 17:13:43 +02:00
|
|
|
install(FILES fastnetmon.conf DESTINATION /etc)
|
|
|
|
|
|
|
|
# Install blank files for networks list and whitelist
|
|
|
|
install(FILES networks_list DESTINATION /etc)
|
|
|
|
install(FILES networks_whitelist DESTINATION /etc)
|
|
|
|
endif()
|
2015-06-04 10:15:32 +02:00
|
|
|
|
2015-06-04 15:13:22 +02:00
|
|
|
# man pages
|
2015-06-04 22:54:29 +02:00
|
|
|
install(FILES man/fastnetmon.1 DESTINATION /usr/share/man/man1)
|
|
|
|
install(FILES man/fastnetmon_client.1 DESTINATION /usr/share/man/man1)
|
2015-06-04 15:13:22 +02:00
|
|
|
|
2015-05-30 20:45:28 +02:00
|
|
|
# Configure cpack package builder
|
|
|
|
# Run it with: cd build; cpack -G DEB ..
|
|
|
|
set(CPACK_PACKAGE_NAME "fastnetmon")
|
|
|
|
set(CPACK_PACKAGE_VENDOR "vps2fast.com")
|
|
|
|
set(CPACK_PACKAGE_CONTACT "pavel.odintsov@gmail.com")
|
|
|
|
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "FastNetMon - very fast DDoS analyzer with sflow/netflow/mirror support")
|
|
|
|
set(CPACK_PACKAGE_VERSION "1.1.2")
|
|
|
|
set(CPACK_PACKAGE_VERSION_MAJOR "1")
|
|
|
|
set(CPACK_PACKAGE_VERSION_MINOR "1")
|
|
|
|
set(CPACK_PACKAGE_VERSION_PATCH "2")
|
|
|
|
set(CPACK_DEBIAN_PACKAGE_DEPENDS "")
|
|
|
|
# set(CPACK_PACKAGE_INSTALL_DIRECTORY "CPack Component Example")
|
|
|
|
|
|
|
|
# Specify config for deb package
|
|
|
|
# http://www.cmake.org/Wiki/CMake:CPackPackageGenerators#DEB_.28UNIX_only.29
|
|
|
|
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libboost-thread-dev, libboost-system-dev, libboost-regex-dev, libpcap-dev, libnuma-dev, liblog4cpp5-dev")
|
|
|
|
|
|
|
|
# This must always be last!
|
|
|
|
include(CPack)
|