proto_ipv6_mobility_hdr.h: Headerfixing
[netsniff-ng.git] / src / netsniff-ng / CMakeLists.txt
blobf724806c8565ef513f9b583e84c8a0f66be540c7
1 PROJECT(netsniff-ng C)
3 SET(BUILD_STRING "generic")
4 FIND_PACKAGE(Threads)
5 INCLUDE(Pod2Man)
7 IF (CMAKE_HAVE_PTHREAD_CREATE)
8         ADD_EXECUTABLE(${PROJECT_NAME}  ../hash.c
9                                         ../dissector.c
10                                         ../dissector_eth.c
11                                         ../xmalloc.c
12                                         ../xio.c
13                                         ../xsys.c
14                                         ../xstring.c
15                                         ../bpf.c
16                                         ../pcap.c
17                                         ../pcap_rw.c
18                                         ../pcap_sg.c
19                                         ../pcap_mmap.c
20                                         ../ring_rx.c
21                                         ../ring_tx.c
22                                         ../mtrand.c
23                                         ../tprintf.c
24                                         ../netsniff-ng.c)
25         ADD_DEFINITIONS(-DPROGNAME_STRING="${PROJECT_NAME}"
26                 -DVERSION_STRING="${VERSION}"
27                 -DBUILD_STRING="${BUILD_STRING}"
28                 -D_FILE_OFFSET_BITS=64
29                 -D_LARGEFILE_SOURCE
30                 -D_LARGEFILE64_SOURCE)
31         POD2MAN(${CMAKE_SOURCE_DIR}/netsniff-ng.c netsniff-ng 8)
32         TARGET_LINK_LIBRARIES(netsniff-ng ${CMAKE_THREAD_LIBS_INIT})
33         FILE(GLOB rules_files "../examples/bpfc/*.bpf")
34         INSTALL(FILES ${rules_files} DESTINATION ${CONFIG_INSTALL_PATH}/rules/)
35         INSTALL(FILES ../conf/ether.conf ../conf/tcp.conf ../conf/udp.conf ../conf/oui.conf DESTINATION ${CONFIG_INSTALL_PATH})
36         INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${EXECUTABLE_INSTALL_PATH})
37 ELSE(CMAKE_HAVE_PTHREAD_CREATE)
38         MESSAGE("pthread is missing on target. Skipping ${PROJECT_NAME} build.")
39 ENDIF(CMAKE_HAVE_PTHREAD_CREATE)