]> git.stg.codes - stg.git/blob - libs/CMakeLists.txt
ece4c9a3ab1d1cefc925681b275d94a38feb7daf
[stg.git] / libs / CMakeLists.txt
1 set ( CMAKE_POSITION_INDEPENDENT_CODE ON )
2
3 if ( BUILD_LIB_COMMON )
4     add_library ( common STATIC common/blockio.cpp common/common.cpp common/strptime.cpp )
5     target_include_directories ( common PUBLIC common/include )
6 endif ( BUILD_LIB_COMMON )
7
8 if ( BUILD_LIB_CONFFILES )
9     add_library ( conffiles STATIC conffiles/conffiles.cpp )
10     target_include_directories ( conffiles PUBLIC conffiles/include )
11 endif ( BUILD_LIB_CONFFILES )
12
13 if ( BUILD_LIB_CRYPTO )
14     add_library ( crypto STATIC crypto/ag_md5.c crypto/bfstream.cpp crypto/blowfish.c )
15     target_include_directories ( crypto PUBLIC crypto/include )
16 endif ( BUILD_LIB_CRYPTO )
17
18 if ( BUILD_LIB_DOTCONFPP )
19     add_library ( dotconfpp STATIC dotconfpp/dotconfpp.cpp dotconfpp/mempool.cpp )
20     target_include_directories ( dotconfpp PUBLIC dotconfpp/include )
21 endif ( BUILD_LIB_DOTCONFPP )
22
23 if ( BUILD_LIB_IA )
24     add_library ( ia STATIC ia/ia.cpp )
25     target_include_directories ( ia PUBLIC ia/include )
26     target_link_libraries ( ia crypto common )
27 endif ( BUILD_LIB_IA )
28
29 if ( BUILD_LIB_IBPP )
30     add_library ( ibpp STATIC ibpp/all_in_one.cpp )
31     target_include_directories ( ibpp PUBLIC ibpp/include )
32 endif ( BUILD_LIB_IBPP )
33
34 if ( BUILD_LIB_JSON )
35     add_library ( json STATIC json/generator.cpp json/parser.cpp )
36     target_include_directories ( json PUBLIC json/include )
37     target_link_libraries ( json common )
38 endif ( BUILD_LIB_JSON )
39
40 if ( BUILD_LIB_LOGGER )
41     add_library ( logger STATIC logger/logger.cpp )
42     target_include_directories ( logger PUBLIC logger/include )
43 endif ( BUILD_LIB_LOGGER )
44
45 if ( BUILD_LIB_PINGER )
46     add_library ( pinger STATIC pinger/pinger.cpp )
47     target_include_directories ( pinger PUBLIC pinger/include )
48     target_link_libraries ( pinger common )
49 endif ( BUILD_LIB_PINGER )
50
51 if ( BUILD_LIB_SCRIPTEXECUTER )
52     add_library ( scriptexecuter STATIC scriptexecuter/scriptexecuter.c )
53     target_include_directories ( scriptexecuter PUBLIC scriptexecuter/include )
54 endif ( BUILD_LIB_SCRIPTEXECUTER )
55
56 if ( BUILD_LIB_SMUX )
57     file ( GLOB SMUX_C_FILES smux/*.c )
58     add_library ( smux STATIC ${SMUX_C_FILES} )
59     target_include_directories ( smux PUBLIC smux/include smux/include/stg )
60 endif ( BUILD_LIB_SMUX )
61
62 if ( BUILD_LIB_SRVCONF )
63     file ( GLOB PARSERS srvconf/parsers/*.cpp )
64     add_library ( srvconf STATIC srvconf/servconf.cpp srvconf/netunit.cpp ${PARSERS} )
65     target_include_directories ( srvconf PUBLIC srvconf/include )
66     target_link_libraries ( srvconf crypto common )
67 endif ( BUILD_LIB_SRVCONF )