summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Fainelli <f.fainelli@gmail.com>2016-07-11 12:07:08 -0700
committerJohn Crispin <john@phrozen.org>2016-07-24 06:22:40 +0200
commit47b23946cb2d51c486cd01596744955f850e2060 (patch)
tree83144a3cba7f5496acb2630a03e84fac58345fc4
parentbe8ead27f625b3e4ed383f270dcfee2d158231ec (diff)
downloadfirewall3-47b23946cb2d51c486cd01596744955f850e2060.tar.gz
cmake: Find uci.h
Add a CMake FIND_PATH and INCLUDE_DIRECTORIES searching for uci.h. Some external toolchains which do not include standard locations would fail to find the header otherwise. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
-rw-r--r--CMakeLists.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 22e890d..00d1444 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -17,6 +17,9 @@ ELSE()
ADD_DEFINITIONS(-DDISABLE_IPV6)
ENDIF()
+FIND_PATH(uci_include_dir uci.h)
+INCLUDE_DIRECTORIES(${uci_include_dir})
+
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)
TARGET_LINK_LIBRARIES(firewall3 uci ubox ubus xtables m dl ${iptc_libs} ${ext_libs})