Browse Source

* update cmake

master
Alex 'AdUser' Z 8 years ago
parent
commit
d8aa017a57
  1. 2
      CMakeLists.txt
  2. 4
      src/CMakeLists.txt

2
CMakeLists.txt

@ -9,6 +9,7 @@ include(CTest)
option(WITH_CLIENT "Simple client for configuring daemon" ON)
option(WITH_CSOCKET "Unix control socket support for daemon" ON)
option(WITH_HARDENING "Enable hardening options" ON)
option(WITH_READLINE "Use readline library for client" ON)
option(WITH_PCRE "Build pcre-compatible filter" ON)
option(WITH_REDIS "Build redis source/backend" OFF)
option(WITH_MCAST "Build mcast source/backend" OFF)
@ -57,6 +58,7 @@ message(STATUS "- WITH_PCRE : ${WITH_PCRE}")
message(STATUS "- WITH_REDIS : ${WITH_REDIS}")
message(STATUS "- WITH_MCAST : ${WITH_MCAST}")
message(STATUS "- WITH_IPSET : ${WITH_IPSET}")
message(STATUS "- WITH_READLINE : ${WITH_READLINE}")
message(STATUS "Components:")
add_subdirectory(src)

4
src/CMakeLists.txt

@ -16,6 +16,10 @@ install(TARGETS "f2b" RUNTIME DESTINATION ${CMAKE_INSTALL_SBINDIR})
if (WITH_CLIENT)
set(SOURCES "strlcpy.c" "log.c" "client.c" "cmsg.c" "commands.c" "csocket.c")
add_executable("f2bc" ${SOURCES})
if (WITH_READLINE)
add_definitions("-DWITH_READLINE")
target_link_libraries("f2bc" "readline")
endif ()
install(TARGETS "f2bc" RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
endif ()

Loading…
Cancel
Save