Disable curvetun Cmake build.
[netsniff-ng.git] / CMakeLists.txt
blob2d3294d0f9774176ee6222184aed2873f56f4779
1 #Project name is not mandatory, but you should use it
2 PROJECT(netsniff-ng-toolkit C)
4 # States that CMake required version must be >= 2.6
5 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
7 SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
8 # Activate this when you want to build a shared lib out the the lib/ directory
9 # Bear in mind that no profiling will be available on 64-bit arch when on
10 # SET(BUILD_SHARED_LIBS ON)
12 FIND_PACKAGE(Curses REQUIRED)
13 FIND_PACKAGE(Threads REQUIRED)
15 IF (NOT CMAKE_HAVE_PTHREAD_CREATE)
16         MESSAGE(FATAL_ERROR "The framework only supports pthread")
17 ENDIF(NOT CMAKE_HAVE_PTHREAD_CREATE)
20 FIND_PACKAGE(Doxygen)
22 INCLUDE(CheckBPF)
23 INCLUDE(CheckPFPacket)
24 INCLUDE(CheckStrictAlign)
25 INCLUDE(CheckTxRing)
27 ADD_DEFINITIONS(
28         -O2
29         -fstack-protector
30         -std=gnu99
31         -fno-strict-aliasing
32         -Wall
33         -Wundef
34         -Wstrict-prototypes
35         -Wno-trigraphs
36         -Werror-implicit-function-declaration
37         -Wno-format-security
38         -Wcomments
39         -Wendif-labels
40         -Wno-long-long
41         -Wuninitialized
42         -Wstrict-overflow=1
47 IF (CMAKE_BUILD_TYPE STREQUAL profile)
48         ADD_DEFINITIONS(-g -pg)
49 ENDIF (CMAKE_BUILD_TYPE STREQUAL profile)
51 ENABLE_TESTING()
53 ADD_SUBDIRECTORY(src)