1 cmake_minimum_required(VERSION 2.6)
4 ADD_DEFINITIONS(-Os -Wall -Werror --std=gnu99 -g3 -Wmissing-declarations)
8 SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
10 LIST(APPEND ext_libs iptext)
11 LIST(APPEND ext_libs iptext4)
14 LIST(APPEND ext_libs iptext6)
15 LIST(APPEND iptc_libs ip6tc)
17 ADD_DEFINITIONS(-DDISABLE_IPV6)
20 ADD_EXECUTABLE(firewall3 main.c options.c defaults.c zones.c forwards.c rules.c redirects.c snats.c utils.c ubus.c ipsets.c includes.c iptables.c)
21 TARGET_LINK_LIBRARIES(firewall3 uci ubox ubus xtables m dl ${iptc_libs} ${ext_libs})
23 SET(CMAKE_INSTALL_PREFIX /usr)
25 INSTALL(TARGETS firewall3 RUNTIME DESTINATION sbin)