X-Git-Url: http://git.archive.openwrt.org/?p=project%2Ffirewall3.git;a=blobdiff_plain;f=CMakeLists.txt;h=199819006aece63437d81be1c6da10c97ac14ef3;hp=50b1c3f43ba6d806ffdc137879963ef99460eb06;hb=1f3cd50c62a909da3f3245284de473583440109a;hpb=b6109157659a7d3f389797cfc6f91c90641ba33e diff --git a/CMakeLists.txt b/CMakeLists.txt index 50b1c3f..1998190 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,8 +10,17 @@ IF(APPLE) LINK_DIRECTORIES(/opt/local/lib) ENDIF() +ADD_LIBRARY(ext STATIC IMPORTED) +SET_PROPERTY(TARGET ext PROPERTY IMPORTED_LOCATION ${CMAKE_SOURCE_DIR}/libext.a) + +ADD_LIBRARY(ext4 STATIC IMPORTED) +SET_PROPERTY(TARGET ext4 PROPERTY IMPORTED_LOCATION "${CMAKE_SOURCE_DIR}/libext4.a") + +ADD_LIBRARY(ext6 STATIC IMPORTED) +SET_PROPERTY(TARGET ext6 PROPERTY IMPORTED_LOCATION "${CMAKE_SOURCE_DIR}/libext6.a") + 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 iptables.c) -TARGET_LINK_LIBRARIES(firewall3 uci ubox ubus ip4tc ip6tc) +TARGET_LINK_LIBRARIES(firewall3 uci ubox ubus ip4tc ip6tc xtables m -Wl,--whole-archive ext ext4 ext6 -Wl,--no-whole-archive) SET(CMAKE_INSTALL_PREFIX /usr)