Browse Source

cmake: Find libubox/utils.h header file

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@gmail.com>
Florian Fainelli 7 years ago
parent
commit
d7617abb22
1 changed files with 2 additions and 0 deletions
  1. 2 0
      CMakeLists.txt

+ 2 - 0
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()