cmake_minimum_required(VERSION 2.6)
PROJECT(firewall3 C)
-ADD_DEFINITIONS(-Os -Wall -Werror --std=gnu99 -g3 -Wmissing-declarations)
+ADD_DEFINITIONS(-Os -Wall -Werror --std=gnu99 -g3 -Wmissing-declarations -Wno-format-truncation)
SET(iptc_libs ip4tc)
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
-LIST(APPEND ext_libs iptext)
-LIST(APPEND ext_libs iptext4)
+IF (NOT DISABLE_STATIC_EXTENSIONS)
+ LIST(APPEND ext_libs iptext)
+ LIST(APPEND ext_libs iptext4)
+ IF (NOT DISABLE_IPV6)
+ LIST(APPEND ext_libs iptext6)
+ ENDIF()
+ELSE()
+ ADD_DEFINITIONS(-DDISABLE_STATIC_EXTENSIONS)
+ENDIF()
IF (NOT DISABLE_IPV6)
- LIST(APPEND ext_libs iptext6)
LIST(APPEND iptc_libs ip6tc)
ELSE()
ADD_DEFINITIONS(-DDISABLE_IPV6)