Browse Source

* add WITH_MCAST build option

master
Alex 'AdUser' Z 8 years ago
parent
commit
4a4abda354
  1. 4
      CMakeLists.txt
  2. 2
      src/backends/CMakeLists.txt
  3. 2
      src/sources/CMakeLists.txt

4
CMakeLists.txt

@ -10,7 +10,8 @@ option(WITH_CLIENT "Simple client for configuring daemon" ON)
option(WITH_CSOCKET "Unix control socket support for daemon" ON) option(WITH_CSOCKET "Unix control socket support for daemon" ON)
option(WITH_HARDENING "Enable hardening options" ON) option(WITH_HARDENING "Enable hardening options" ON)
option(WITH_PCRE "Build pcre-compatible filter" ON) option(WITH_PCRE "Build pcre-compatible filter" ON)
option(WITH_REDIS "Build redis backend" OFF) option(WITH_REDIS "Build redis source/backend" OFF)
option(WITH_MCAST "Build mcast source/backend" OFF)
if (NOT DEFINED CMAKE_INSTALL_PREFIX) if (NOT DEFINED CMAKE_INSTALL_PREFIX)
set(CMAKE_INSTALL_PREFIX "/usr") set(CMAKE_INSTALL_PREFIX "/usr")
@ -50,6 +51,7 @@ message(STATUS "- WITH_CSOCKET : ${WITH_CSOCKET}")
message(STATUS "- WITH_HARDENING : ${WITH_HARDENING}") message(STATUS "- WITH_HARDENING : ${WITH_HARDENING}")
message(STATUS "- WITH_PCRE : ${WITH_PCRE}") message(STATUS "- WITH_PCRE : ${WITH_PCRE}")
message(STATUS "- WITH_REDIS : ${WITH_REDIS}") message(STATUS "- WITH_REDIS : ${WITH_REDIS}")
message(STATUS "- WITH_MCAST : ${WITH_MCAST}")
message(STATUS "Components:") message(STATUS "Components:")
add_subdirectory(src) add_subdirectory(src)

2
src/backends/CMakeLists.txt

@ -4,8 +4,10 @@ set(BACKENDS "")
add_library("f2b_backend_exec" MODULE "exec.c" "../strlcpy.c") add_library("f2b_backend_exec" MODULE "exec.c" "../strlcpy.c")
list(APPEND BACKENDS "f2b_backend_exec") list(APPEND BACKENDS "f2b_backend_exec")
if (WITH_MCAST)
add_library("f2b_backend_mcast" MODULE "mcast.c" "../strlcpy.c" add_library("f2b_backend_mcast" MODULE "mcast.c" "../strlcpy.c"
"../commands.c" "../cmsg.c" "../csocket.c") "../commands.c" "../cmsg.c" "../csocket.c")
endif ()
find_library(REDIS_FOUND "hiredis") find_library(REDIS_FOUND "hiredis")
if (WITH_REDIS AND REDIS_FOUND) if (WITH_REDIS AND REDIS_FOUND)

2
src/sources/CMakeLists.txt

@ -7,9 +7,11 @@ list(APPEND SOURCES "f2b_source_files")
add_library("f2b_source_portknock" MODULE "portknock.c" "../strlcpy.c") add_library("f2b_source_portknock" MODULE "portknock.c" "../strlcpy.c")
list(APPEND SOURCES "f2b_source_portknock") list(APPEND SOURCES "f2b_source_portknock")
if (WITH_MCAST)
add_library("f2b_source_mcast" MODULE "mcast.c" "../strlcpy.c" add_library("f2b_source_mcast" MODULE "mcast.c" "../strlcpy.c"
"../commands.c" "../cmsg.c" "../csocket.c") "../commands.c" "../cmsg.c" "../csocket.c")
list(APPEND SOURCES "f2b_source_mcast") list(APPEND SOURCES "f2b_source_mcast")
endif ()
find_library(REDIS_FOUND "hiredis") find_library(REDIS_FOUND "hiredis")
if (WITH_REDIS AND REDIS_FOUND) if (WITH_REDIS AND REDIS_FOUND)

Loading…
Cancel
Save