docs: add tree for fedora/rhel maintenance
[netsniff-ng.git] / src / CMakeLists.txt
blobe97ebf3e9a78a72a9237b10e8c3ce66990cce544
1 project(netsniff-ng-suite C)
3 cmake_minimum_required(VERSION 2.6)
5 set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
6 set(EXECUTABLE_INSTALL_PATH /usr/sbin)
7 set(CONFIG_INSTALL_PATH /etc/netsniff-ng)
8 set(DOC_INSTALL_PATH share/doc/netsniff-ng)
10 set(VERSION "0.5.8")
12 include(CheckBPFAttach)
13 include(CheckPFPacket)
14 include(CheckStrictAlign)
15 include(CheckTxRing)
16 include(CheckHwTimestamp)
17 include(CheckGeoIpv6)
18 include(Pod2Man)
20 add_definitions(
21   -O3
22   -fstack-protector
23   --param=ssp-buffer-size=4
24   -fpie
25   -std=gnu99
26   -fno-strict-aliasing
27   -fexceptions
28   -fasynchronous-unwind-tables
29   -D_FORTIFY_SOURCE=2
30   -D_REENTRANT
31   -march=native
32   -mtune=native
33   -Wall
34   -Wundef
35   -Wstrict-prototypes
36   -Werror-implicit-function-declaration
37   -Wformat=2
38   -Wcomments
39   -Wendif-labels
40   -Wuninitialized
41   -Winit-self
42   -Wstrict-overflow=1
43   -Wtype-limits
44   -Wmissing-parameter-type
45   -Wclobbered
46   -Wempty-body
47   -Wignored-qualifiers
48   -Wmissing-include-dirs
49   -Woverlength-strings
50   -Wmissing-field-initializers
51   -Wmissing-declarations
52   -Wmissing-prototypes
53   -Wlogical-op
54   -Woverride-init
55   -Wnested-externs
56   -Wredundant-decls
57   -Winvalid-pch
58   -Wdisabled-optimization
59   -Wstack-protector
60   -Waggregate-return
61   -Wcast-align
62   -Wunsafe-loop-optimizations
63   -Wfloat-equal
64   -Wunknown-pragmas
65   -Wunused-function
68 if(CMAKE_BUILD_TYPE STREQUAL profile)
69   add_definitions(
70     -g
71     -pg
72   )
73 endif(CMAKE_BUILD_TYPE STREQUAL profile)
75 enable_testing()
77 add_manpage_target()
79 include_directories(.)
81 add_subdirectory(netsniff-ng)
82 add_subdirectory(ifpps)
83 add_subdirectory(trafgen)
84 add_subdirectory(bpfc)
85 add_subdirectory(astraceroute)
86 add_subdirectory(curvetun)
87 add_subdirectory(flowtop)
89 # Release notes
90 install(
91   FILES ../Documentation/RelNotes/Notes-0.5.6
92   DESTINATION ${DOC_INSTALL_PATH}
95 install(
96   FILES ../Documentation/RelNotes/Notes-0.5.7
97   DESTINATION ${DOC_INSTALL_PATH}
100 # Additional usage information
101 install(
102   FILES ../Documentation/FurtherReading
103   DESTINATION ${DOC_INSTALL_PATH}
106 install(
107   FILES ../Documentation/IPv6Notes
108   DESTINATION ${DOC_INSTALL_PATH}
111 install(
112   FILES ../Documentation/KnownIssues
113   DESTINATION ${DOC_INSTALL_PATH}
116 install(
117   FILES ../Documentation/Performance
118   DESTINATION ${DOC_INSTALL_PATH}
121 install(
122   FILES ../Documentation/RelatedWork
123   DESTINATION ${DOC_INSTALL_PATH}
126 install(
127   FILES ../Documentation/Sponsors
128   DESTINATION ${DOC_INSTALL_PATH}