1 set ( CMAKE_POSITION_INDEPENDENT_CODE ON )
3 if ( BUILD_LIB_COMMON )
4 find_package ( Iconv REQUIRED )
5 add_library ( common STATIC common/blockio.cpp common/common.cpp common/strptime.cpp )
6 target_include_directories ( common PUBLIC common/include )
7 target_link_libraries ( common Iconv::Iconv )
8 endif ( BUILD_LIB_COMMON )
10 if ( BUILD_LIB_CONFFILES )
11 add_library ( conffiles STATIC conffiles/conffiles.cpp )
12 target_include_directories ( conffiles PUBLIC conffiles/include )
13 endif ( BUILD_LIB_CONFFILES )
15 if ( BUILD_LIB_CRYPTO )
16 add_library ( crypto STATIC crypto/ag_md5.c crypto/bfstream.cpp crypto/blowfish.c )
17 target_include_directories ( crypto PUBLIC crypto/include )
18 endif ( BUILD_LIB_CRYPTO )
20 if ( BUILD_LIB_DOTCONFPP )
21 add_library ( dotconfpp STATIC dotconfpp/dotconfpp.cpp dotconfpp/mempool.cpp )
22 target_include_directories ( dotconfpp PUBLIC dotconfpp/include )
23 endif ( BUILD_LIB_DOTCONFPP )
26 add_library ( ia STATIC ia/ia.cpp )
27 target_include_directories ( ia PUBLIC ia/include )
28 target_link_libraries ( ia crypto common )
29 endif ( BUILD_LIB_IA )
32 add_library ( ibpp STATIC ibpp/all_in_one.cpp )
33 target_include_directories ( ibpp PUBLIC ibpp/include )
34 endif ( BUILD_LIB_IBPP )
37 find_package ( YAJL REQUIRED )
38 add_library ( json STATIC json/generator.cpp json/parser.cpp )
39 target_include_directories ( json PUBLIC json/include )
40 target_link_libraries ( json common YAJL::YAJL )
41 endif ( BUILD_LIB_JSON )
43 if ( BUILD_LIB_LOGGER )
44 add_library ( logger STATIC logger/logger.cpp )
45 target_include_directories ( logger PUBLIC logger/include )
46 endif ( BUILD_LIB_LOGGER )
48 if ( BUILD_LIB_PINGER )
49 add_library ( pinger STATIC pinger/pinger.cpp )
50 target_include_directories ( pinger PUBLIC pinger/include )
51 target_link_libraries ( pinger common )
52 endif ( BUILD_LIB_PINGER )
54 if ( BUILD_LIB_SCRIPTEXECUTER )
55 add_library ( scriptexecuter STATIC scriptexecuter/scriptexecuter.c )
56 target_include_directories ( scriptexecuter PUBLIC scriptexecuter/include )
57 endif ( BUILD_LIB_SCRIPTEXECUTER )
60 file ( GLOB SMUX_C_FILES smux/*.c )
61 add_library ( smux STATIC ${SMUX_C_FILES} )
62 target_include_directories ( smux PUBLIC smux/include smux/include/stg )
63 endif ( BUILD_LIB_SMUX )
65 if ( BUILD_LIB_SRVCONF )
66 file ( GLOB PARSERS srvconf/parsers/*.cpp )
67 add_library ( srvconf STATIC srvconf/servconf.cpp srvconf/netunit.cpp ${PARSERS} )
68 target_include_directories ( srvconf PUBLIC srvconf/include )
69 target_link_libraries ( srvconf crypto common )
70 endif ( BUILD_LIB_SRVCONF )