File: CMakeLists.txt

package info (click to toggle)
ettercap 1:0.8.2-10
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 5,468 kB
  • ctags: 6,333
  • sloc: ansic: 47,337; yacc: 310; lex: 204; makefile: 121; xml: 31; sh: 24
file content (224 lines) | stat: -rw-r--r-- 6,234 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
set(EC_SRC
	ec_mem.c
        ec_capture.c
        ec_checksum.c
        ec_conf.c
        ec_connbuf.c
        ec_conntrack.c
        ec_debug.c
        ec_decode.c
        ec_dispatcher.c
        ec_dissect.c
        ec_encryption_ccmp.c
        ec_encryption_tkip.c
        ec_encryption.c
        ec_error.c
        ec_exit.c
        ec_file.c
        ec_filter.c
        ec_fingerprint.c
        ec_format.c
        ec_globals.c
        ec_hash.c
        ec_hook.c
        ec_inet.c
        ec_inject.c
        ec_log.c
        ec_manuf.c
        ec_mitm.c
        ec_network.c
        ec_packet.c
        ec_passive.c
        ec_plugins.c
        ec_poll.c
        ec_profiles.c
        ec_resolv.c
        ec_scan.c
        ec_send.c
        ec_services.c
        ec_session.c
        ec_set.c
        ec_signals.c
        ec_sleep.c
        ec_sniff_bridge.c
        ec_sniff.c
        ec_sniff_unified.c
        ec_socket.c
        ec_sslwrap.c
        ec_stats.c
        ec_streambuf.c
        ec_strings.c
        ec_threads.c
        ec_ui.c
        ec_utils.c

        dissectors/ec_bgp.c
        dissectors/ec_cvs.c
        dissectors/ec_dhcp.c
        dissectors/ec_ftp.c
        dissectors/ec_gg.c
        dissectors/ec_http.c
        dissectors/ec_icq.c
        dissectors/ec_imap.c
        dissectors/ec_irc.c
        dissectors/ec_iscsi.c
        dissectors/ec_ldap.c
        dissectors/ec_mdns.c
        dissectors/ec_mongodb.c
        dissectors/ec_mountd.c
        dissectors/ec_msn.c
        dissectors/ec_mysql.c
        dissectors/ec_nbns.c
        dissectors/ec_nntp.c
        dissectors/ec_o5logon.c
        dissectors/ec_ospf.c
        dissectors/ec_pop.c
        dissectors/ec_postgresql.c
        dissectors/ec_portmap.c
        dissectors/ec_radius.c
        dissectors/ec_rcon.c
        dissectors/ec_rip.c
        dissectors/ec_rlogin.c
        dissectors/ec_smb.c
        dissectors/ec_smtp.c
        dissectors/ec_snmp.c
        dissectors/ec_socks.c
        dissectors/ec_ssh.c
        dissectors/ec_telnet.c
        dissectors/ec_TN3270.c
        dissectors/ec_vnc.c
        dissectors/ec_vrrp.c
        dissectors/ec_x11.c
        dissectors/ec_ymsg.c

        mitm/ec_arp_poisoning.c
        mitm/ec_dhcp_spoofing.c
        mitm/ec_icmp_redirect.c
        mitm/ec_port_stealing.c

        protocols/ec_arp.c
        protocols/ec_cooked.c
        protocols/ec_erf.c
        protocols/ec_eth.c
        protocols/ec_fddi.c
        protocols/ec_gre.c
        protocols/ec_esp.c
        protocols/ec_icmp.c
        protocols/ec_ip.c
        protocols/ec_mpls.c
        protocols/ec_null.c
        protocols/ec_ppi.c
        protocols/ec_ppp.c
        protocols/ec_pppoe.c
        protocols/ec_rawip.c
        protocols/ec_tcp.c
        protocols/ec_tr.c
        protocols/ec_udp.c
        protocols/ec_vlan.c
        protocols/ec_wifi.c
        protocols/ec_wifi_eapol.c
        protocols/ec_wifi_prism.c
        protocols/ec_wifi_radiotap.c
)


if(ENABLE_IPV6)
    set(EC_SRC ${EC_SRC} protocols/ec_icmp6.c protocols/ec_ip6.c mitm/ec_ip6nd_poison.c)
endif(ENABLE_IPV6)

if(HAVE_DN_EXPAND)
    set(EC_SRC ${EC_SRC} dissectors/ec_dns.c)
endif(HAVE_DN_EXPAND)

if(OS_LINUX)
    set(EC_SRC ${EC_SRC} os/ec_linux.c)
elseif(OS_BSD)
    set(EC_SRC ${EC_SRC} os/ec_bsd.c)
elseif(OS_DARWIN)
    set(EC_SRC ${EC_SRC} os/ec_darwin.c)
elseif(OS_MINGW)
    set(EC_SRC ${EC_SRC} os/ec_mingw.c)
elseif(OS_SOLARIS)
    set(EC_SRC ${EC_SRC} os/ec_solaris.c)
elseif(OS_GNU)
    set(EC_SRC ${EC_SRC} os/ec_gnu.c)
endif()

if(NOT HAVE_STRLCAT AND NOT HAVE_STRLCAT_FUNCTION)
    set(EC_SRC ${EC_SRC} missing/strlcat.c)
endif(NOT HAVE_STRLCAT AND NOT HAVE_STRLCAT_FUNCTION)
if(NOT HAVE_STRLCPY AND NOT HAVE_STRLCPY_FUNCTION)
    set(EC_SRC ${EC_SRC} missing/strlcpy.c)
endif(NOT HAVE_STRLCPY AND NOT HAVE_STRLCPY_FUNCTION)
if(NOT HAVE_STRSEP)
    set(EC_SRC ${EC_SRC} missing/strsep.c)
endif(NOT HAVE_STRSEP)
if(NOT HAVE_STRCASESTR)
    set(EC_SRC ${EC_SRC} missing/strcasestr.c)
endif(NOT HAVE_STRCASESTR)
if(NOT HAVE_MEMMEM)
    set(EC_SRC ${EC_SRC} missing/memmem.c)
endif(NOT HAVE_MEMMEM)
if(NOT HAVE_BASENAME)
    set(EC_SRC ${EC_SRC} missing/basename.c)
endif(NOT HAVE_BASENAME)
if(NOT HAVE_STRNDUP)
    set(EC_SRC ${EC_SRC} missing/strndup.c)
endif(NOT HAVE_STRNDUP)
if(NOT HAVE_INET_ATON)
    set(EC_SRC ${EC_SRC} missing/inet_aton.c)
endif(NOT HAVE_INET_ATON)
if(NOT HAVE_GETOPT_LONG AND NOT HAVE_GETOPT_H)
    set(EC_SRC ${EC_SRC} missing/getopt.c)
endif(NOT HAVE_GETOPT_LONG AND NOT HAVE_GETOPT_H)

add_library(lib_ettercap SHARED ${EC_SRC})
add_dependencies(lib_ettercap libnet)
target_link_libraries(lib_ettercap ${EC_LIBETTERCAP_LIBS})

if (NOT LIBRARY_BUILD)
  add_subdirectory(interfaces)
  include_directories( interfaces/daemon interfaces/text )
  if (ENABLE_CURSES)
    include_directories( interfaces/curses interfaces/curses/widgets )
  endif (ENABLE_CURSES)
  if (ENABLE_GTK)
    include_directories( interfaces/gtk )
  endif(ENABLE_GTK)
  add_executable(ettercap ec_parser.c ec_main.c)
  target_link_libraries(ettercap ec_interfaces lib_ettercap ${EC_LIBS})
  if(NOT DISABLE_RPATH)
    set_target_properties(ettercap PROPERTIES
    INSTALL_RPATH ${INSTALL_LIBDIR})
  endif(NOT DISABLE_RPATH)
endif(NOT LIBRARY_BUILD)

# Only compile lua stuff if lua is enabled!
IF(ENABLE_LUA)
  add_subdirectory(lua)
  target_link_libraries(lib_ettercap ec_lua ${LUAJIT_LIBRARY})
  if(OS_DARWIN AND (CMAKE_SIZEOF_VOID_P EQUAL 8))
    # On 64-bit OSX platforms, luajit requires the following flags to be added.
    # See: http://luajit.org/install.html
    target_link_libraries(ettercap "-pagezero_size 10000 -image_base 100000000")
  endif(OS_DARWIN AND (CMAKE_SIZEOF_VOID_P EQUAL 8))
endif(ENABLE_LUA)

#if(NOT LIBRARY_BUILD)
	#target_link_libraries(lib_ettercap ec_interfaces ${EC_LIBS})
#else(NOT LIBRARY_BUILD)
	#target_link_libraries(lib_ettercap ${EC_LIBS})
#endif(NOT LIBRARY_BUILD)

set_target_properties(lib_ettercap PROPERTIES 
  ENABLE_EXPORTS On
  #  LINK_INTERFACE_LIBRARIES ""
  OUTPUT_NAME ettercap
  VERSION 0.0.0
  SOVERSION 0
  )

install(TARGETS lib_ettercap DESTINATION ${INSTALL_LIBDIR})
if(NOT LIBRARY_BUILD)
  install(TARGETS ettercap DESTINATION ${INSTALL_BINDIR})
endif(NOT LIBRARY_BUILD)