option ( BUILD_MOD_CAP_PCAP "Build PCap capture STG module." OFF )
option ( BUILD_MOD_CAP_NFQUEUE "Build NFQueue capture STG module." OFF )
+# Firebird is getting deprecated, negation option
+option ( BUILD_NO_MOD_STORE_FIREBIRD "Do not build Firebird store STG module." OFF )
+
# Grouping
option ( BUILD_ALL_MODS "Build all modules." OFF )
option ( BUILD_ALL_LIBS "Build all libraries." OFF )
set ( BUILD_MOD_CAP_PCAP ON )
endif ( BUILD_ALL_MODS )
+if ( BUILD_NO_MOD_STORE_FIREBIRD )
+ set ( BUILD_MOD_STORE_FIREBIRD OFF )
+endif ( BUILD_NO_MOD_STORE_FIREBIRD )
+
if ( BUILD_MOD_STORE_FIREBIRD OR BUILD_ALL_LIBS )
set ( BUILD_LIB_IBPP ON )
endif ( BUILD_MOD_STORE_FIREBIRD OR BUILD_ALL_LIBS )
[![Build Status](https://travis-ci.org/madf/stg.svg?branch=master)](https://travis-ci.org/madf/stg)
A billing system for small home and office networks.
+
+## Dependencies
+
+* CMake - build system.
+* Iconv - character encoding conversion.
+* Expat (optional) - required by `mod_conf_sg` configuration plugin.
+* xmlrpc-c (optional) - required by `mod_conf_rpc` configuration plugin.
+* PCap (optional) - required by `mod_cap_pcap` traffic capture plugin.
+* `libnetfilter_queue`, `libnfnetlink`, `libmnl` (optional) - required by `mod_cap_nfqueue` traffic capture plugin.
+* Firebird (optional) - required by `mod_store_firebird` storage plugin.
+* PostgreSQL (optional) - required by `mod_store_postgresql` storage plugin.
+* MySQL Connector (optional) - required by `mod_store_mysql` storage plugin.
+* boost (optional) - unit tests.
+
+## Compilation and Installation
+
+```
+mkdir build
+cd build
+cmake ..
+make
+make install
+```
+
+It will install everything in /usr/local by default. If you want to install with a different destdir:
+
+```
+$ make DESTDIR=/path/to/your/destdir install
+```
+
+It will automatically append usr/local to your destdir. So if you specify DESTDIR=foo you will result in the following directory structure:
+
+```
+foo/usr/local/bin
+foo/usr/local/include
+foo/usr/local/lib
+```
+
+If you want a custom install dir prefix use CMAKE_INSTALL_PREFIX at compile time:
+
+```
+$ cmake -DCMAKE_INSTALL_PREFIX=/your/prefix ..
+$ make
+$ make install
+```
+
+If you specify -DCMAKE_INSTALL_PREFIX=foo you will result in the following directory structure:
+
+```
+foo/bin
+foo/include
+foo/lib
+```
+
+### Notes for MacOS X
+
+1. It is not easy to use Firebird on MacOS X, so you may want to opt-out its storage plugin. Use `-DBUILD_NO_MOD_STORE_FIREBIRD=ON` as `cmake` command line option.
+2. Homebrew XMLRPC-C version is too old. You may want to build it from scratch. In order to make it visible to CMake, pass `-DXMLRPC_C_CONFIG=/path/to/xmlrpc-c-config` to `cmake`.
+3. CMake usually does not see MySQL Connector library installed by Homebrew. Pass `-DMySQLConnector_ROOT=/usr/local/opt/mysql-client/` to `cmake` to make it visible.
+
+## Documentation
+
+https://stg.net.ua/doc/index.html
configuration/rpcconfig/messages_methods.cpp )
target_link_libraries ( mod_conf_rpc scriptexecuter logger common ${XMLRPC_LIBRARIES} )
set_target_properties ( mod_conf_rpc PROPERTIES PREFIX "" )
+ if ( ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" )
+ set_target_properties ( mod_conf_rpc PROPERTIES LINK_FLAGS "-undefined dynamic_lookup" )
+ endif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" )
if ( CLANG_TIDY_EXE )
set_target_properties ( mod_conf_rpc PROPERTIES CXX_CLANG_TIDY "${DO_CLANG_TIDY}" )
store/postgresql/postgresql_store_utils.cpp )
target_link_libraries ( mod_store_postgresql crypto logger common ${PostgreSQL_LIBRARIES} )
set_target_properties ( mod_store_postgresql PROPERTIES PREFIX "" )
+ if ( ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" )
+ set_target_properties ( mod_store_postgresql PROPERTIES LINK_FLAGS "-undefined dynamic_lookup" )
+ endif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" )
if ( CLANG_TIDY_EXE )
set_target_properties ( mod_store_postgresql PROPERTIES CXX_CLANG_TIDY "${DO_CLANG_TIDY}" )