-
Notifications
You must be signed in to change notification settings - Fork 5
/
CMakeLists.txt
40 lines (31 loc) · 976 Bytes
/
CMakeLists.txt
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
cmake_minimum_required(VERSION 3.14)
project(arpspoof C)
set(CMAKE_C_STANDARD 11)
#pkg-config
find_package(PkgConfig)
#get libnet config
pkg_check_modules(LIBNET REQUIRED libnet)
MESSAGE(STATUS ${LIBNET_LIBRARY_DIRS})
MESSAGE(STATUS ${LIBNET_INCLUDE_DIRS})
MESSAGE(STATUS ${LIBNET_LIBRARIES})
#get libpcap config
pkg_check_modules(LIBPCAP REQUIRED libpcap)
MESSAGE(STATUS ${LIBPCAP_LIBRARY_DIRS})
MESSAGE(STATUS ${LIBPCAP_INCLUDE_DIRS})
MESSAGE(STATUS ${LIBPCAP_LIBRARIES})
#lib dirs
link_directories(
${LIBNET_LIBRARY_DIRS}
${LIBPCAP_LIBRARY_DIRS}
)
#header dirs
include_directories(
${LIBNET_INCLUDE_DIRS}
${LIBPCAP_INCLUDE_DIRS}
)
add_executable(arpspoof arpspoof.c arp.c)
target_link_libraries(arpspoof ${LIBNET_LIBRARIES})
#target_link_libraries(arpspoof libnet.a)
target_link_libraries(arpspoof ${LIBPCAP_LIBRARIES})
#target_link_libraries(arpspoof libpcap.a)
install(TARGETS arpspoof RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})