3 # States that CMake required version must be >= 2.6
4 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
6 SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
7 # Activate this when you want to build a shared lib out the the lib/ directory
8 # Bear in mind that no profiling will be available on 64-bit arch when on
9 # SET(BUILD_SHARED_LIBS ON)
11 FIND_PACKAGE(Threads REQUIRED)
13 IF(CMAKE_HAVE_PTHREAD_CREATE)
14 SET(LIBS ${LIBS} ${CMAKE_THREAD_LIBS_INIT})
15 ELSE(CMAKE_HAVE_PTHREAD_CREATE)
16 MESSAGE(FATAL_ERROR "The framework only supports pthread")
17 ENDIF(CMAKE_HAVE_PTHREAD_CREATE)
19 INCLUDE(CheckBPFAttach)
20 INCLUDE(CheckPFPacket)
21 INCLUDE(CheckStrictAlign)
36 # Only strip executable on release
37 SET(CMAKE_C_FLAGS_RELEASE "-s")
39 IF(CMAKE_C_COMPILER_ID STREQUAL GNU)
46 ENDIF(CMAKE_C_COMPILER_ID STREQUAL GNU)
48 IF (CMAKE_BUILD_TYPE STREQUAL profile)
49 ADD_DEFINITIONS(-g -pg)
50 ENDIF (CMAKE_BUILD_TYPE STREQUAL profile)
54 ADD_CUSTOM_TARGET(setcap)
55 ADD_CUSTOM_TARGET(doc)
57 ADD_SUBDIRECTORY(libdabba)
58 ADD_SUBDIRECTORY(dabbad)
59 ADD_SUBDIRECTORY(dabba)