[LEDE-DEV] [PATCH usign] cmake: Find libubox/utils.h header file

Florian Fainelli f.fainelli at gmail.com
Fri Jul 1 16:04:05 PDT 2016


Add a CMake FIND_PATH and INCLUDE_DIRECTORIES searching for
libubox/utils.h.  Some external toolchains which do not include standard
locations would fail to find the header otherwise.

Signed-off-by: Florian Fainelli <f.fainelli at gmail.com>
---
 CMakeLists.txt | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 68f50ff00b23..50a9226941c3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -9,6 +9,8 @@ SET(LIBS)
 IF(USE_LIBUBOX)
   ADD_DEFINITIONS(-DUSE_LIBUBOX)
   SET(LIBS ubox)
+  FIND_PATH(ubox_include_dir libubox/utils.h)
+  INCLUDE_DIRECTORIES(${ubox_include_dir})
 ELSE()
   SET(SOURCES ${SOURCES} base64.c)
 ENDIF()
-- 
2.7.4




More information about the Lede-dev mailing list