diff mbox

[LEDE-DEV,firewall3] cmake: Find uci.h

Message ID 1468264028-1973-1-git-send-email-f.fainelli@gmail.com
State Accepted
Headers show

Commit Message

Florian Fainelli July 11, 2016, 7:07 p.m. UTC
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>
---
 CMakeLists.txt | 3 +++
 1 file changed, 3 insertions(+)
diff mbox

Patch

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 22e890dff9c6..00d14449d151 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})