generalize enum parsing
[project/firewall3.git] / CMakeLists.txt
1 cmake_minimum_required(VERSION 2.6)
2
3 PROJECT(firewall3 C)
4 ADD_DEFINITIONS(-Os -Wall -Werror --std=gnu99 -g3 -Wmissing-declarations)
5
6 SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
7
8 IF(APPLE)
9   INCLUDE_DIRECTORIES(/opt/local/include)
10   LINK_DIRECTORIES(/opt/local/lib)
11 ENDIF()
12
13 ADD_EXECUTABLE(firewall3 main.c options.c defaults.c zones.c forwards.c rules.c redirects.c utils.c ubus.c ipsets.c includes.c)
14 TARGET_LINK_LIBRARIES(firewall3 uci ubox ubus)
15
16 SET(CMAKE_INSTALL_PREFIX /usr)
17
18 INSTALL(TARGETS firewall3
19         RUNTIME DESTINATION sbin
20 )