2 add_library ( mod_auth_ao MODULE authorization/ao/ao.cpp )
3 target_link_libraries ( mod_auth_ao scriptexecuter logger common )
4 set_target_properties ( mod_auth_ao PROPERTIES PREFIX "" )
8 add_library ( mod_auth_ia MODULE authorization/inetaccess/inetaccess.cpp )
9 target_link_libraries ( mod_auth_ia scriptexecuter crypto logger common )
10 set_target_properties ( mod_auth_ia PROPERTIES PREFIX "" )
11 if ( ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" )
12 set_target_properties ( mod_auth_ia PROPERTIES LINK_FLAGS "-undefined dynamic_lookup" )
13 endif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" )
14 endif ( BUILD_MOD_IA )
16 if ( BUILD_MOD_CAP_NF )
17 add_library ( mod_cap_nf MODULE capture/cap_nf/cap_nf.cpp )
18 target_link_libraries ( mod_cap_nf logger common )
19 set_target_properties ( mod_cap_nf PROPERTIES PREFIX "" )
20 endif ( BUILD_MOD_CAP_NF )
22 if ( BUILD_MOD_CAP_DIVERT )
23 add_library ( mod_cap_divert MODULE capture/divert_freebsd/divert_cap.cpp )
24 target_link_libraries ( mod_cap_divert logger common )
25 set_target_properties ( mod_cap_divert PROPERTIES PREFIX "" )
26 endif ( BUILD_MOD_CAP_DIVERT )
28 if ( BUILD_MOD_CAP_ETHER_FREEBSD )
29 add_library ( mod_cap_bpf MODULE capture/ether_freebsd/ether_cap.cpp )
30 target_link_libraries ( mod_cap_bpf logger common )
31 set_target_properties ( mod_cap_bpf PROPERTIES PREFIX "" )
32 endif ( BUILD_MOD_CAP_ETHER_FREEBSD )
34 if ( BUILD_MOD_CAP_ETHER_LINUX )
35 add_library ( mod_cap_ether MODULE capture/ether_linux/ether_cap.cpp )
36 target_link_libraries ( mod_cap_ether logger common )
37 set_target_properties ( mod_cap_ether PROPERTIES PREFIX "" )
38 endif ( BUILD_MOD_CAP_ETHER_LINUX )
40 if ( BUILD_MOD_CAP_PCAP )
41 find_package ( PCap REQUIRED )
42 add_library ( mod_cap_pcap MODULE capture/pcap/pcap_cap.cpp )
43 target_link_libraries ( mod_cap_pcap logger common PCap::PCap )
44 set_target_properties ( mod_cap_pcap PROPERTIES PREFIX "" )
45 endif ( BUILD_MOD_CAP_PCAP )
47 if ( BUILD_MOD_CAP_NFQUEUE )
48 find_package ( NFQueue REQUIRED )
49 find_package ( NFNetLink REQUIRED )
50 find_package ( MNL REQUIRED )
51 add_library ( mod_cap_nfqueue MODULE capture/nfqueue/nfqueue.cpp )
52 target_link_libraries ( mod_cap_nfqueue logger common NF::Queue NF::NetLink MNL::MNL )
53 set_target_properties ( mod_cap_nfqueue PROPERTIES PREFIX "" )
54 endif ( BUILD_MOD_CAP_NFQUEUE )
56 if ( BUILD_MOD_SGCONFIG )
57 find_package ( EXPAT REQUIRED )
58 add_library ( mod_conf_sg MODULE configuration/sgconfig/stgconfig.cpp
59 configuration/sgconfig/conn.cpp
60 configuration/sgconfig/configproto.cpp
61 configuration/sgconfig/parser.cpp
62 configuration/sgconfig/parser_tariffs.cpp
63 configuration/sgconfig/parser_admins.cpp
64 configuration/sgconfig/parser_users.cpp
65 configuration/sgconfig/parser_services.cpp
66 configuration/sgconfig/parser_message.cpp
67 configuration/sgconfig/parser_auth_by.cpp
68 configuration/sgconfig/parser_user_info.cpp
69 configuration/sgconfig/parser_server_info.cpp )
70 target_link_libraries ( mod_conf_sg scriptexecuter crypto logger common EXPAT::EXPAT )
71 set_target_properties ( mod_conf_sg PROPERTIES PREFIX "" )
72 if ( ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" )
73 set_target_properties ( mod_conf_sg PROPERTIES LINK_FLAGS "-undefined dynamic_lookup" )
74 endif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" )
75 endif ( BUILD_MOD_SGCONFIG )
77 if ( BUILD_MOD_RPCCONFIG )
78 find_package ( XMLRPC REQUIRED c++ abyss-server )
79 include_directories ( ${XMLRPC_INCLUDE_DIRS} )
80 add_library ( mod_conf_rpc MODULE configuration/rpcconfig/rpcconfig.cpp
81 configuration/rpcconfig/user_helper.cpp
82 configuration/rpcconfig/tariff_helper.cpp
83 configuration/rpcconfig/info_methods.cpp
84 configuration/rpcconfig/users_methods.cpp
85 configuration/rpcconfig/tariffs_methods.cpp
86 configuration/rpcconfig/admins_methods.cpp
87 configuration/rpcconfig/messages_methods.cpp )
88 target_link_libraries ( mod_conf_rpc scriptexecuter logger common ${XMLRPC_LIBRARIES} )
89 set_target_properties ( mod_conf_rpc PROPERTIES PREFIX "" )
90 endif ( BUILD_MOD_RPCCONFIG )
93 add_library ( mod_ping MODULE other/ping/ping.cpp )
94 target_link_libraries ( mod_ping scriptexecuter logger pinger common )
95 set_target_properties ( mod_ping PROPERTIES PREFIX "" )
96 endif ( BUILD_MOD_PING )
98 if ( BUILD_MOD_RADIUS )
99 find_package ( YAJL REQUIRED )
100 add_library ( mod_radius MODULE other/radius/radius.cpp
101 other/radius/config.cpp
102 other/radius/conn.cpp )
103 target_link_libraries ( mod_radius logger json common YAJL::YAJL )
104 set_target_properties ( mod_radius PROPERTIES PREFIX "" )
105 endif ( BUILD_MOD_RADIUS )
107 if ( BUILD_MOD_RSCRYPT )
108 add_library ( mod_remote_script MODULE other/rscript/rscript.cpp other/rscript/nrmap_parser.cpp )
109 target_link_libraries ( mod_remote_script crypto scriptexecuter logger common )
110 set_target_properties ( mod_remote_script PROPERTIES PREFIX "" )
111 if ( ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" )
112 set_target_properties ( mod_remote_script PROPERTIES LINK_FLAGS "-undefined dynamic_lookup" )
113 endif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" )
114 endif ( BUILD_MOD_RSCRYPT )
116 if ( BUILD_MOD_SMUX )
117 add_library ( mod_smux MODULE other/smux/smux.cpp
118 other/smux/sensors.cpp
119 other/smux/tables.cpp
120 other/smux/handlers.cpp
122 other/smux/types.cpp )
123 target_link_libraries ( mod_smux scriptexecuter logger smux common )
124 set_target_properties ( mod_smux PROPERTIES PREFIX "" )
125 endif ( BUILD_MOD_SMUX )
127 if ( BUILD_MOD_STORE_FILES )
128 add_library ( mod_store_files MODULE store/files/file_store.cpp )
129 target_link_libraries ( mod_store_files crypto conffiles logger common )
130 set_target_properties ( mod_store_files PROPERTIES PREFIX "" )
131 endif ( BUILD_MOD_STORE_FILES )
133 if ( BUILD_MOD_STORE_FIREBIRD )
134 find_package ( FBClient REQUIRED )
135 add_library ( mod_store_firebird MODULE store/firebird/firebird_store.cpp
136 store/firebird/firebird_store_admins.cpp
137 store/firebird/firebird_store_corporations.cpp
138 store/firebird/firebird_store_messages.cpp
139 store/firebird/firebird_store_services.cpp
140 store/firebird/firebird_store_tariffs.cpp
141 store/firebird/firebird_store_users.cpp
142 store/firebird/firebird_store_utils.cpp )
143 target_link_libraries ( mod_store_firebird crypto common logger ibpp FBClient::FBClient )
144 set_target_properties ( mod_store_firebird PROPERTIES PREFIX "" )
145 endif ( BUILD_MOD_STORE_FIREBIRD )
147 if ( BUILD_MOD_STORE_MYSQL )
148 find_package ( MySQLConnector REQUIRED )
149 add_library ( mod_store_mysql MODULE store/mysql/mysql_store.cpp )
150 target_link_libraries ( mod_store_mysql crypto logger common MySQL::Connector )
151 set_target_properties ( mod_store_mysql PROPERTIES PREFIX "" )
152 endif ( BUILD_MOD_STORE_MYSQL )
154 if ( BUILD_MOD_STORE_POSTGRESQL )
155 find_package ( PostgreSQL REQUIRED )
156 include_directories ( ${PostgreSQL_INCLUDE_DIRS} )
157 add_library ( mod_store_postgresql MODULE store/postgresql/postgresql_store.cpp
158 store/postgresql/postgresql_store_admins.cpp
159 store/postgresql/postgresql_store_corporations.cpp
160 store/postgresql/postgresql_store_messages.cpp
161 store/postgresql/postgresql_store_services.cpp
162 store/postgresql/postgresql_store_tariffs.cpp
163 store/postgresql/postgresql_store_users.cpp
164 store/postgresql/postgresql_store_utils.cpp )
165 target_link_libraries ( mod_store_postgresql crypto logger common ${PostgreSQL_LIBRARIES} )
166 set_target_properties ( mod_store_postgresql PROPERTIES PREFIX "" )
167 endif ( BUILD_MOD_STORE_POSTGRESQL )