forked from opentechinstitute/commotiond
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
45 lines (38 loc) · 1.25 KB
/
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
41
42
43
44
45
cmake_minimum_required(VERSION 2.6)
PROJECT(commotion)
SET(NO_OPTIMIZE 1)
SET(DEBUG 1)
SET(OPENWRT 1)
SET(COMMOTION_VERSION_MAJOR 0)
SET(COMMOTION_VERSION_MINOR 1)
SET(COMMOTION_VERSION_PATCH 0)
SET(COMMOTION_STATEDIR \"/var/run/commotion\")
SET(COMMOTION_PIDFILE \"/var/run/commotiond.pid\")
SET(COMMOTION_MANAGESOCK \"/var/run/commotiond.sock\")
SET(COMMOTION_PLUGINDIR \"/usr/lib/commotion/plugins\")
SET(COMMOTION_PROFILEDIR \"/etc/commotion/profiles.d\")
SET(CMAKE_EXE_LINKER_FLAGS "-ldl")
CONFIGURE_FILE( "${CMAKE_SOURCE_DIR}/src/config.h.in" "${CMAKE_SOURCE_DIR}/src/config.h" )
ADD_DEFINITIONS(-Os -Wall --std=gnu99 -Wmissing-declarations -DNDEBUG)
IF(OPENWRT)
ADD_DEFINITIONS(-D_OPENWRT)
ENDIF()
IF(DEBUG)
ADD_DEFINITIONS(-g3)
REMOVE_DEFINITIONS(-DNDEBUG)
IF(NO_OPTIMIZE)
ADD_DEFINITIONS(-O0)
ENDIF()
ENDIF()
ADD_SUBDIRECTORY(src)
if(NOT OPENWRT)
find_package(Doxygen)
if(DOXYGEN_FOUND)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doxygen/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
add_custom_target(doc ALL
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating API documentation with Doxygen" VERBATIM
)
endif(DOXYGEN_FOUND)
endif()