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 "" )
7 set_target_properties ( mod_auth_ao PROPERTIES CXX_CLANG_TIDY "${DO_CLANG_TIDY}" )
9 if ( INCLUDE_WHAT_YOU_USE_EXE )
10 set_target_properties ( mod_auth_ao PROPERTIES CXX_INCLUDE_WHAT_YOU_USE "${DO_INCLUDE_WHAT_YOU_USE}" )
12 endif ( BUILD_MOD_AO )
15 add_library ( mod_auth_ia MODULE authorization/inetaccess/inetaccess.cpp )
16 target_link_libraries ( mod_auth_ia scriptexecuter crypto logger common )
17 set_target_properties ( mod_auth_ia PROPERTIES PREFIX "" )
18 if ( ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" )
19 set_target_properties ( mod_auth_ia PROPERTIES LINK_FLAGS "-undefined dynamic_lookup" )
20 endif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" )
23 set_target_properties ( mod_auth_ia PROPERTIES CXX_CLANG_TIDY "${DO_CLANG_TIDY}" )
25 if ( INCLUDE_WHAT_YOU_USE_EXE )
26 set_target_properties ( mod_auth_ia PROPERTIES CXX_INCLUDE_WHAT_YOU_USE "${DO_INCLUDE_WHAT_YOU_USE}" )
28 endif ( BUILD_MOD_IA )
30 if ( BUILD_MOD_CAP_NF )
31 add_library ( mod_cap_nf MODULE capture/cap_nf/cap_nf.cpp )
32 target_link_libraries ( mod_cap_nf logger common )
33 set_target_properties ( mod_cap_nf PROPERTIES PREFIX "" )
36 set_target_properties ( mod_cap_nf PROPERTIES CXX_CLANG_TIDY "${DO_CLANG_TIDY}" )
38 if ( INCLUDE_WHAT_YOU_USE_EXE )
39 set_target_properties ( mod_cap_nf PROPERTIES CXX_INCLUDE_WHAT_YOU_USE "${DO_INCLUDE_WHAT_YOU_USE}" )
41 endif ( BUILD_MOD_CAP_NF )
43 if ( BUILD_MOD_CAP_DIVERT )
44 add_library ( mod_cap_divert MODULE capture/divert_freebsd/divert_cap.cpp )
45 target_link_libraries ( mod_cap_divert logger common )
46 set_target_properties ( mod_cap_divert PROPERTIES PREFIX "" )
49 set_target_properties ( mod_cap_divert PROPERTIES CXX_CLANG_TIDY "${DO_CLANG_TIDY}" )
51 if ( INCLUDE_WHAT_YOU_USE_EXE )
52 set_target_properties ( mod_cap_divert PROPERTIES CXX_INCLUDE_WHAT_YOU_USE "${DO_INCLUDE_WHAT_YOU_USE}" )
54 endif ( BUILD_MOD_CAP_DIVERT )
56 if ( BUILD_MOD_CAP_ETHER_FREEBSD )
57 add_library ( mod_cap_bpf MODULE capture/ether_freebsd/ether_cap.cpp )
58 target_link_libraries ( mod_cap_bpf logger common )
59 set_target_properties ( mod_cap_bpf PROPERTIES PREFIX "" )
62 set_target_properties ( mod_cap_bpf PROPERTIES CXX_CLANG_TIDY "${DO_CLANG_TIDY}" )
64 if ( INCLUDE_WHAT_YOU_USE_EXE )
65 set_target_properties ( mod_cap_bpf PROPERTIES CXX_INCLUDE_WHAT_YOU_USE "${DO_INCLUDE_WHAT_YOU_USE}" )
67 endif ( BUILD_MOD_CAP_ETHER_FREEBSD )
69 if ( BUILD_MOD_CAP_ETHER_LINUX )
70 add_library ( mod_cap_ether MODULE capture/ether_linux/ether_cap.cpp )
71 target_link_libraries ( mod_cap_ether logger common )
72 set_target_properties ( mod_cap_ether PROPERTIES PREFIX "" )
75 set_target_properties ( mod_cap_ether PROPERTIES CXX_CLANG_TIDY "${DO_CLANG_TIDY}" )
77 if ( INCLUDE_WHAT_YOU_USE_EXE )
78 set_target_properties ( mod_cap_ether PROPERTIES CXX_INCLUDE_WHAT_YOU_USE "${DO_INCLUDE_WHAT_YOU_USE}" )
80 endif ( BUILD_MOD_CAP_ETHER_LINUX )
82 if ( BUILD_MOD_CAP_PCAP )
83 find_package ( PCap REQUIRED )
84 add_library ( mod_cap_pcap MODULE capture/pcap/pcap_cap.cpp )
85 target_link_libraries ( mod_cap_pcap logger common PCap::PCap )
86 set_target_properties ( mod_cap_pcap PROPERTIES PREFIX "" )
89 set_target_properties ( mod_cap_pcap PROPERTIES CXX_CLANG_TIDY "${DO_CLANG_TIDY}" )
91 if ( INCLUDE_WHAT_YOU_USE_EXE )
92 set_target_properties ( mod_cap_pcap PROPERTIES CXX_INCLUDE_WHAT_YOU_USE "${DO_INCLUDE_WHAT_YOU_USE}" )
94 endif ( BUILD_MOD_CAP_PCAP )
96 if ( BUILD_MOD_CAP_NFQUEUE )
97 find_package ( NFQueue REQUIRED )
98 find_package ( NFNetLink REQUIRED )
99 find_package ( MNL REQUIRED )
100 add_library ( mod_cap_nfqueue MODULE capture/nfqueue/nfqueue.cpp )
101 target_link_libraries ( mod_cap_nfqueue logger common NF::Queue NF::NetLink MNL::MNL )
102 set_target_properties ( mod_cap_nfqueue PROPERTIES PREFIX "" )
104 if ( CLANG_TIDY_EXE )
105 set_target_properties ( mod_cap_nfqueue PROPERTIES CXX_CLANG_TIDY "${DO_CLANG_TIDY}" )
107 if ( INCLUDE_WHAT_YOU_USE_EXE )
108 set_target_properties ( mod_cap_nfqueue PROPERTIES CXX_INCLUDE_WHAT_YOU_USE "${DO_INCLUDE_WHAT_YOU_USE}" )
110 endif ( BUILD_MOD_CAP_NFQUEUE )
112 if ( BUILD_MOD_SGCONFIG )
113 find_package ( EXPAT REQUIRED )
114 add_library ( mod_conf_sg MODULE configuration/sgconfig/stgconfig.cpp
115 configuration/sgconfig/conn.cpp
116 configuration/sgconfig/configproto.cpp
117 configuration/sgconfig/parser.cpp
118 configuration/sgconfig/parser_tariffs.cpp
119 configuration/sgconfig/parser_admins.cpp
120 configuration/sgconfig/parser_users.cpp
121 configuration/sgconfig/parser_services.cpp
122 configuration/sgconfig/parser_message.cpp
123 configuration/sgconfig/parser_auth_by.cpp
124 configuration/sgconfig/parser_user_info.cpp
125 configuration/sgconfig/parser_server_info.cpp )
126 target_link_libraries ( mod_conf_sg scriptexecuter crypto logger common EXPAT::EXPAT )
127 set_target_properties ( mod_conf_sg PROPERTIES PREFIX "" )
128 if ( ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" )
129 set_target_properties ( mod_conf_sg PROPERTIES LINK_FLAGS "-undefined dynamic_lookup" )
130 endif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" )
132 if ( CLANG_TIDY_EXE )
133 set_target_properties ( mod_conf_sg PROPERTIES CXX_CLANG_TIDY "${DO_CLANG_TIDY}" )
135 if ( INCLUDE_WHAT_YOU_USE_EXE )
136 set_target_properties ( mod_conf_sg PROPERTIES CXX_INCLUDE_WHAT_YOU_USE "${DO_INCLUDE_WHAT_YOU_USE}" )
138 endif ( BUILD_MOD_SGCONFIG )
140 if ( BUILD_MOD_RPCCONFIG )
141 find_package ( XMLRPC REQUIRED c++ abyss-server )
142 include_directories ( ${XMLRPC_INCLUDE_DIRS} )
143 add_library ( mod_conf_rpc MODULE configuration/rpcconfig/rpcconfig.cpp
144 configuration/rpcconfig/user_helper.cpp
145 configuration/rpcconfig/tariff_helper.cpp
146 configuration/rpcconfig/info_methods.cpp
147 configuration/rpcconfig/users_methods.cpp
148 configuration/rpcconfig/tariffs_methods.cpp
149 configuration/rpcconfig/admins_methods.cpp
150 configuration/rpcconfig/messages_methods.cpp )
151 target_link_libraries ( mod_conf_rpc scriptexecuter logger common ${XMLRPC_LIBRARIES} )
152 target_compile_definitions ( mod_conf_rpc PUBLIC auto_ptr=unique_ptr )
153 set_target_properties ( mod_conf_rpc PROPERTIES PREFIX "" )
155 if ( CLANG_TIDY_EXE )
156 set_target_properties ( mod_conf_rpc PROPERTIES CXX_CLANG_TIDY "${DO_CLANG_TIDY}" )
158 if ( INCLUDE_WHAT_YOU_USE_EXE )
159 set_target_properties ( mod_conf_rpc PROPERTIES CXX_INCLUDE_WHAT_YOU_USE "${DO_INCLUDE_WHAT_YOU_USE}" )
161 endif ( BUILD_MOD_RPCCONFIG )
163 if ( BUILD_MOD_PING )
164 add_library ( mod_ping MODULE other/ping/ping.cpp )
165 target_link_libraries ( mod_ping scriptexecuter logger pinger common )
166 set_target_properties ( mod_ping PROPERTIES PREFIX "" )
168 if ( CLANG_TIDY_EXE )
169 set_target_properties ( mod_ping PROPERTIES CXX_CLANG_TIDY "${DO_CLANG_TIDY}" )
171 if ( INCLUDE_WHAT_YOU_USE_EXE )
172 set_target_properties ( mod_ping PROPERTIES CXX_INCLUDE_WHAT_YOU_USE "${DO_INCLUDE_WHAT_YOU_USE}" )
174 endif ( BUILD_MOD_PING )
176 if ( BUILD_MOD_RSCRYPT )
177 add_library ( mod_remote_script MODULE other/rscript/rscript.cpp other/rscript/nrmap_parser.cpp )
178 target_link_libraries ( mod_remote_script crypto scriptexecuter logger common )
179 set_target_properties ( mod_remote_script PROPERTIES PREFIX "" )
180 if ( ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" )
181 set_target_properties ( mod_remote_script PROPERTIES LINK_FLAGS "-undefined dynamic_lookup" )
182 endif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" )
184 if ( CLANG_TIDY_EXE )
185 set_target_properties ( mod_remote_script PROPERTIES CXX_CLANG_TIDY "${DO_CLANG_TIDY}" )
187 if ( INCLUDE_WHAT_YOU_USE_EXE )
188 set_target_properties ( mod_remote_script PROPERTIES CXX_INCLUDE_WHAT_YOU_USE "${DO_INCLUDE_WHAT_YOU_USE}" )
190 endif ( BUILD_MOD_RSCRYPT )
192 if ( BUILD_MOD_SMUX )
193 add_library ( mod_smux MODULE other/smux/smux.cpp
194 other/smux/sensors.cpp
195 other/smux/tables.cpp
196 other/smux/handlers.cpp
198 other/smux/types.cpp )
199 target_link_libraries ( mod_smux scriptexecuter logger smux common )
200 set_target_properties ( mod_smux PROPERTIES PREFIX "" )
202 if ( CLANG_TIDY_EXE )
203 set_target_properties ( mod_smux PROPERTIES CXX_CLANG_TIDY "${DO_CLANG_TIDY}" )
205 if ( INCLUDE_WHAT_YOU_USE_EXE )
206 set_target_properties ( mod_smux PROPERTIES CXX_INCLUDE_WHAT_YOU_USE "${DO_INCLUDE_WHAT_YOU_USE}" )
208 endif ( BUILD_MOD_SMUX )
210 if ( BUILD_MOD_STORE_FILES )
211 add_library ( mod_store_files MODULE store/files/file_store.cpp )
212 target_link_libraries ( mod_store_files crypto conffiles logger common )
213 set_target_properties ( mod_store_files PROPERTIES PREFIX "" )
215 if ( CLANG_TIDY_EXE )
216 set_target_properties ( mod_store_files PROPERTIES CXX_CLANG_TIDY "${DO_CLANG_TIDY}" )
218 if ( INCLUDE_WHAT_YOU_USE_EXE )
219 set_target_properties ( mod_store_files PROPERTIES CXX_INCLUDE_WHAT_YOU_USE "${DO_INCLUDE_WHAT_YOU_USE}" )
221 endif ( BUILD_MOD_STORE_FILES )
223 if ( BUILD_MOD_STORE_FIREBIRD )
224 find_package ( FBClient REQUIRED )
225 add_library ( mod_store_firebird MODULE store/firebird/firebird_store.cpp
226 store/firebird/firebird_store_admins.cpp
227 store/firebird/firebird_store_corporations.cpp
228 store/firebird/firebird_store_messages.cpp
229 store/firebird/firebird_store_services.cpp
230 store/firebird/firebird_store_tariffs.cpp
231 store/firebird/firebird_store_users.cpp
232 store/firebird/firebird_store_utils.cpp )
233 target_link_libraries ( mod_store_firebird crypto common logger ibpp FBClient::FBClient )
234 set_target_properties ( mod_store_firebird PROPERTIES PREFIX "" )
236 if ( CLANG_TIDY_EXE )
237 set_target_properties ( mod_store_firebird PROPERTIES CXX_CLANG_TIDY "${DO_CLANG_TIDY}" )
239 if ( INCLUDE_WHAT_YOU_USE_EXE )
240 set_target_properties ( mod_store_firebird PROPERTIES CXX_INCLUDE_WHAT_YOU_USE "${DO_INCLUDE_WHAT_YOU_USE}" )
242 endif ( BUILD_MOD_STORE_FIREBIRD )
244 if ( BUILD_MOD_STORE_MYSQL )
245 find_package ( MySQLConnector REQUIRED )
246 add_library ( mod_store_mysql MODULE store/mysql/mysql_store.cpp )
247 target_link_libraries ( mod_store_mysql crypto logger common MySQL::Connector )
248 set_target_properties ( mod_store_mysql PROPERTIES PREFIX "" )
250 if ( CLANG_TIDY_EXE )
251 set_target_properties ( mod_store_mysql PROPERTIES CXX_CLANG_TIDY "${DO_CLANG_TIDY}" )
253 if ( INCLUDE_WHAT_YOU_USE_EXE )
254 set_target_properties ( mod_store_mysql PROPERTIES CXX_INCLUDE_WHAT_YOU_USE "${DO_INCLUDE_WHAT_YOU_USE}" )
256 endif ( BUILD_MOD_STORE_MYSQL )
258 if ( BUILD_MOD_STORE_POSTGRESQL )
259 find_package ( PostgreSQL REQUIRED )
260 include_directories ( ${PostgreSQL_INCLUDE_DIRS} )
261 add_library ( mod_store_postgresql MODULE store/postgresql/postgresql_store.cpp
262 store/postgresql/postgresql_store_admins.cpp
263 store/postgresql/postgresql_store_corporations.cpp
264 store/postgresql/postgresql_store_messages.cpp
265 store/postgresql/postgresql_store_services.cpp
266 store/postgresql/postgresql_store_tariffs.cpp
267 store/postgresql/postgresql_store_users.cpp
268 store/postgresql/postgresql_store_utils.cpp )
269 target_link_libraries ( mod_store_postgresql crypto logger common ${PostgreSQL_LIBRARIES} )
270 set_target_properties ( mod_store_postgresql PROPERTIES PREFIX "" )
272 if ( CLANG_TIDY_EXE )
273 set_target_properties ( mod_store_postgresql PROPERTIES CXX_CLANG_TIDY "${DO_CLANG_TIDY}" )
275 if ( INCLUDE_WHAT_YOU_USE_EXE )
276 set_target_properties ( mod_store_postgresql PROPERTIES CXX_INCLUDE_WHAT_YOU_USE "${DO_INCLUDE_WHAT_YOU_USE}" )
278 endif ( BUILD_MOD_STORE_POSTGRESQL )