]> git.stg.codes - stg.git/blob - projects/stargazer/plugins/CMakeLists.txt
Fix old-style casts.
[stg.git] / projects / stargazer / plugins / CMakeLists.txt
1 if ( BUILD_MOD_AO )
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 "" )
5 endif ( BUILD_MOD_AO )
6
7 if ( BUILD_MOD_IA )
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 )
15
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 )
21
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 )
27
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 )
33
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 )
39
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 )
46
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 )
55
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 )
76
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 )
91
92 if ( BUILD_MOD_PING )
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 )
97
98 if ( BUILD_MOD_RSCRYPT )
99     add_library ( mod_remote_script MODULE other/rscript/rscript.cpp other/rscript/nrmap_parser.cpp )
100     target_link_libraries ( mod_remote_script crypto scriptexecuter logger common )
101     set_target_properties ( mod_remote_script PROPERTIES PREFIX "" )
102     if ( ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" )
103         set_target_properties ( mod_remote_script PROPERTIES LINK_FLAGS "-undefined dynamic_lookup" )
104     endif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" )
105 endif ( BUILD_MOD_RSCRYPT )
106
107 if ( BUILD_MOD_SMUX )
108     add_library ( mod_smux MODULE other/smux/smux.cpp
109                                   other/smux/sensors.cpp
110                                   other/smux/tables.cpp
111                                   other/smux/handlers.cpp
112                                   other/smux/utils.cpp
113                                   other/smux/types.cpp )
114     target_link_libraries ( mod_smux scriptexecuter logger smux common )
115     set_target_properties ( mod_smux PROPERTIES PREFIX "" )
116 endif ( BUILD_MOD_SMUX )
117
118 if ( BUILD_MOD_STORE_FILES )
119     add_library ( mod_store_files MODULE store/files/file_store.cpp )
120     target_link_libraries ( mod_store_files crypto conffiles logger common )
121     set_target_properties ( mod_store_files PROPERTIES PREFIX "" )
122 endif ( BUILD_MOD_STORE_FILES )
123
124 #if ( BUILD_MOD_STORE_FIREBIRD )
125 #    find_package ( FBClient REQUIRED )
126 #    add_library ( mod_store_firebird MODULE store/firebird/firebird_store.cpp
127 #                                            store/firebird/firebird_store_admins.cpp
128 #                                            store/firebird/firebird_store_corporations.cpp
129 #                                            store/firebird/firebird_store_messages.cpp
130 #                                            store/firebird/firebird_store_services.cpp
131 #                                            store/firebird/firebird_store_tariffs.cpp
132 #                                            store/firebird/firebird_store_users.cpp
133 #                                            store/firebird/firebird_store_utils.cpp )
134 #    target_link_libraries ( mod_store_firebird crypto common logger ibpp FBClient::FBClient )
135 #    set_target_properties ( mod_store_firebird PROPERTIES PREFIX "" )
136 #endif ( BUILD_MOD_STORE_FIREBIRD )
137
138 if ( BUILD_MOD_STORE_MYSQL )
139     find_package ( MySQLConnector REQUIRED )
140     add_library ( mod_store_mysql MODULE store/mysql/mysql_store.cpp )
141     target_link_libraries ( mod_store_mysql crypto logger common MySQL::Connector )
142     set_target_properties ( mod_store_mysql PROPERTIES PREFIX "" )
143 endif ( BUILD_MOD_STORE_MYSQL )
144
145 if ( BUILD_MOD_STORE_POSTGRESQL )
146     find_package ( PostgreSQL REQUIRED )
147     include_directories ( ${PostgreSQL_INCLUDE_DIRS} )
148     add_library ( mod_store_postgresql MODULE store/postgresql/postgresql_store.cpp
149                                               store/postgresql/postgresql_store_admins.cpp
150                                               store/postgresql/postgresql_store_corporations.cpp
151                                               store/postgresql/postgresql_store_messages.cpp
152                                               store/postgresql/postgresql_store_services.cpp
153                                               store/postgresql/postgresql_store_tariffs.cpp
154                                               store/postgresql/postgresql_store_users.cpp
155                                               store/postgresql/postgresql_store_utils.cpp )
156                                       target_link_libraries ( mod_store_postgresql crypto logger common ${PostgreSQL_LIBRARIES} )
157     set_target_properties ( mod_store_postgresql PROPERTIES PREFIX "" )
158 endif ( BUILD_MOD_STORE_POSTGRESQL )